Electronic device, content reproduction control method, program, storage medium, and integrated circuit

ABSTRACT

To play back a content while managing the right of use of the content, such as a total time of playback of the content, an electronic device stores right information in a right temporary storage unit  59  and judges whether or not use of the content is permitted, in a process of decoding a frame. Also, the electronic device updates the right information stored in the right temporary storage unit  59 . When the frame to be played back is the one at a predetermined position in order, the electronic device stores the right information stored in the right temporary storage unit  59  into a storage area  20.

This application is a Divisional of U.S. application Ser. No.12/299,817, filed Nov. 13, 2008 now U.S. Pat. No. 7,792,292, which is anational stage application of International Application No.PCT/JP2007/060263, filed May 18, 2007.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an electronic device for playing back acontent while managing the right of the content, and specifically to atechnology for making confirmation on and updating the right of thecontent.

2. Description of the Related Art

With the aim of providing a variety of use forms of contents, atechnology for allowing content providers to control the rights of userson the use of the contents has become popular. Such a technology iscalled DRM (Digital Rights Management). As one example, the OMA (OpenMobile Alliance) DRM standard has been formulated.

In such a DRM technology, the right information which is used to managethe user's right needs to be updated according to the use of content bythe user. The Patent Document 1 identified below, for example, disclosesa technology for controlling the playback of a content, for which theplayback deadline has been set, and the update of the right of thecontent.

Meanwhile, in recent years, the OMA DRM R2 standard has been formulated.In this standard, “accumulated” is defined as a method for managing thetotal time of content playback. According to this method, a content ispermitted to be played back with an electronic device until a total timeof playback of the content reaches an upper limit that is preliminarilyset by the right owner. And when the total time of playback has reachedthe upper limit, the playback is stopped. The above-mentioned OMA DRM R2standard requires that the playback should be stopped “as accurately aspossible in time”.

-   Patent Document 1: Japanese Patent Application Publication No.    2005-301634-   Non-Patent Document 1: “Protecting Software from Inverse Analysis    and Modification”, Nikkei Electronics, Jan. 5, 1998, pp. 209-220-   Non-Patent Document 2: “Technology for Making Software    Tamper-Resistant”, Fuji Zerox™, Technical Report No. 13, pp. 20-28.

BRIEF SUMMARY OF THE INVENTION

However, according to the technology disclosed in Patent Document 1,confirmation of right is performed before a content starts to be playedback, and the right is not updated until the playback of the contentends. Therefore, if the right is consumed in the middle of the playbackof the content, then the playback of the content cannot be stopped “asaccurately as possible in time”.

In regards with this matter, to realize the above-mentioned“accumulated” method, the following might be considered. That is to say,the electronic device uses a timer to measure the time and performsconfirmation and update of right sequentially in a process that isdifferent from the processes for decrypting and playing back thecontent, and at a point in time when the right has been consumed, issuesan interrupt or the like to stop the operations of the decryption unitdecrypting the content, and the playback unit playing back the content.

In general, a content is composed of a plurality of frames, and isdecrypted and played back in units of one or more frames. As a result,when, as described above, the operations of the decryption unit and theplayback unit are controlled using a timer interrupt or the like in aprocess that is different from the processes for decrypting and playingback the content, a load is placed onto the electronic device due tooverhead by the interrupt when the right is updated. It is highlypossible that this might cause, for example, frame dropping or soundjumping, and ill-influence the playback of the content. Furthermore, inmany cases, such confirmation and update of right are implemented with atamper-resistant technology to prevent unauthorized modifications. Withthese taken into account, it would be unrealistic to implement all theprocesses concerning confirmation and update of right by hardware sinceit would cost extremely high.

Also, there may be a case where a frame starts to be decrypted becausethe right is valid at the point of the decryption start in time, and theoperation of the decryption unit is stopped by the timer interrupt. Whenthe decryption unit is stopped, the frame is not decrypted although theright of the frame is originally valid. This means that a frame on whichthe user originally has a right to play back is not played back, namely,the right is restricted, resulting in reduction of the right of theuser.

It is therefore an object of the present invention to provide atechnology for controlling the playback of the content by managing theright of the content, without unduly restricting the right of the userand without using a timer interrupt or the like.

The above object is fulfilled by an electronic device for controlling aplayback of a content with use of a tamper-resistant module in managinga right of use of the content, the electronic device comprising astorage unit storing right information used for managing whether or notthe content can be played back, in a state protected from unauthorizedaccesses, wherein the tamper-resistant module includes: a receiving unitoperable to receive, one by one, a plurality of frames that constitutethe content in an encrypted state; a right judging unit operable toperform a judgment of whether or not the content is permitted to beplayed back, in accordance with the right information; and a controlunit operable to (a) cause the right judging unit to perform thejudgment each time a value N satisfies a predetermined judgmentcondition, the value N being a natural number indicating a position of aframe in an order of playback of the frames constituting the content,(b) decrypt the Nth frame when the right judging unit judgesaffirmatively, and (c) restrict the playback of the content with respectto frames after the Nth frame when the right judging unit judgesnegatively.

With above-described structure, the electronic device, with use of thecontrol unit, performs the judgment of whether or not the content ispermitted to be played back, namely, confirms the right of use of thecontent, in a process of decrypting the frame.

Accordingly, the confirmation of the right is performed together withthe decryption process, and other processes such as a timer interruptare not required to perform the confirmation of the right. This reducesthe possibility of suffering from an ill influence such as overhead dueto an interrupt. That is to say, it is possible to confirm the right ofuse of a content by a realistic method. Also, when the right is valid,the frame is decrypted. This prevents the user's right from beingrestricted unduly.

In the above-stated electronic device, the right information may includeplayback total time information and playback right time information, theplayback total time information indicating a playback total time whichis a total time of playback of the content having been performed, theplayback right time information indicating a playback right time being atime period for which the content is permitted to be played back, theright judging unit performs the judgment by comparing the playback righttime with a sum of the playback total time and an elapsed time being atime that has elapsed while the content has been played back, and thecontrol unit includes a right updating sub-unit operable to update theplayback total time information stored in the storage unit according tothe elapsed time, in a process of decrypting the Nth frame when thevalue N satisfies a predetermined update condition.

With the above-described structure, when the right of use of the contenthas a limit by the content playback total time, it is possible to playback the content by managing the right of use of the content, notperforming other processes such as a timer interrupt.

The above-stated electronic device may further comprise a righttemporary storage unit having a storage area which is accessible at ahigher speed than the storage unit, wherein the control unit stores theright information stored in the storage unit, into the right temporarystorage unit, the right judging unit performs the judgment in accordancewith the right information stored in the right temporary storage unit,the right updating sub-unit performs a first process to update theplayback total time information stored in the right temporary storageunit according to the elapsed time, in a process of decrypting a frame,and a second process to store the right information stored in the righttemporary storage unit, into the storage unit in the process ofdecrypting the frame, and the control unit causes the right updatingsub-unit to perform either the first process or the second process orboth thereof, depending on the value N, in the process of decrypting theNth frame.

The right information is stored in the storage unit in the stateprotected from unauthorized accesses. Here, the “right information isstored in the state protected from unauthorized accesses” means that theright information is stored in the encrypted state or that the storageunit has a mechanism for preventing unauthorized accesses, or both ofthem. Accordingly, to access the right information stored in the storageunit, it is necessary to decrypt the right information, performauthentication with the storage unit and the like. That is to say, it isnot necessarily possible to access the storage unit at a sufficientspeed. Thus it may take time to confirm or update the right.

On the other hand, the electronic device with the above-describedstructure includes the right temporary storage unit that has a storagearea which is accessible at a higher speed than the storage unit, andstores the right information into the right temporary storage unit. Andthe electronic device manages the right of use of the content inaccordance with the right information stored in the right temporarystorage unit.

Accordingly, when the processes of confirming and updating the rightshould be performed as necessary, the electronic device can perform theprocesses at high speeds.

In the above-stated electronic device, the control unit may perform athird process to cause the right judging unit to perform the judgment,prohibiting the right updating sub-unit from performing any of the firstprocess and the second process, in the process of decrypting the frame,and a fourth process to, in the process of decrypting the frame,prohibit any of the first process, the second process, and the thirdprocess, and decrypt the frame, and the control unit performs, in eachprocess of decrypting each frame, one of the third process, the fourthprocess, the first process by the right updating sub-unit, the secondprocess by the right updating sub-unit, and both the first process andthe second process by the right updating sub-unit.

As described above, the storage unit stores the right information in astate protected from unauthorized accesses, and thus accessing thestorage unit relatively takes time. That is to say, the electronicdevice can perform processes at a relatively high speed when it does notaccess the storage unit. Accordingly, with the above-describedstructure, the electronic device can update the right information storedin the storage unit in accordance with the processing performance, whileperforming other processes.

In the above-stated electronic device, the control unit, upon receivinga request to end playing back the content, may store the rightinformation stored in the right temporary storage unit, into the storageunit.

With the above-described structure, it is possible to make the rightinformation accurately reflect the content playback state of the user.

In the above-stated electronic device, the control unit, upon receivinga request to end playing back the content, may delete the rightinformation from the right temporary storage unit.

With the above-described structure where the right information isdeleted from the right temporary storage unit, it is possible to preventunauthorized analyses or the like from being made onto the rightinformation.

In the above-stated electronic device, the control unit, upon receivinga request to end playing back the content, may delete a decryption keyfrom the tamper-resistant module, the decryption key being used when thecontent in the encrypted state is decrypted.

With the above-described structure, it is possible to reduce thepossibility that a decryption key, which is used to decrypt a content,is obtained in an unauthorized manner, and thus enhance the protectionof the content.

Meanwhile, the present invention can also be applied to the case wherethe right of use of a content has a limit by the content playbackdeadline.

That is to say, in the above-stated electronic device, the rightinformation may include playback deadline information indicating aplayback deadline of the content, the electronic device furthercomprises: a clock operable to measure a time; and a time obtaining unitoperable to obtain the time measured by the clock, wherein the controlunit causes the time obtaining unit to obtain the time when the rightjudging unit performs the judgment, and the right judging unit judgesnegatively when the time obtained when the right judging unit performsthe judgment has exceeded the playback deadline indicated by theplayback deadline information included in the right information. Withthe above-described structure,

With the above-described structure, when the right of use of the contenthas a limit by the content playback deadline, it is possible to playback the content by managing the right of use of the content.

Also, when the right of use of the content has a limit by the contentplayback deadline, and there is a sufficient time before the contentplayback deadline, the necessity for performing the confirmation ofright frequently by placing a load onto the electronic device isrelatively low. However, when there is a small amount of time before theplayback deadline (for example, when a content is played back on the daybeing the playback deadline), it is preferable that the frequency ofconfirming the right is increased and that the playback of the contentis stopped immediately after the right becomes invalid.

In view of this, in the above-stated electronic device, the control unitmay include a judgment timing determining sub-unit operable to cause thetime obtaining unit to obtain the time when the right judging unitperforms the judgment, and determine a frequency of judgment performedby the right judging unit, according to a length of a remaining timeuntil the playback deadline indicated by the playback deadlineinformation included in the right information.

With the above-described structure, it is possible to adjust the load tobe placed onto the electronic device, in accordance with the length ofthe remaining time until the content playback deadline.

In the above-stated electronic device, the control unit, in a process ofdecrypting an initial frame in the playback of the content, may causethe right judging unit to perform the judgment, and prohibits thecontent from being played back when the right judging unit judgesnegatively.

With the above-described structure, the content is not played back if,at a point in time when the playback of the content is started, thecurrent time has exceeded the playback deadline.

The above-stated electronic device may further comprise a righttemporary storage unit having a storage area which is accessible at ahigher speed than the storage unit, the control unit stores the rightinformation stored in the storage unit, into the right temporary storageunit, and the right judging unit performs the judgment in accordancewith the right information stored in the right temporary storage unit.

In the above-stated electronic device, the control unit may store theright information stored in the storage unit, into the right temporarystorage unit when a playback of a content is started, and delete theright information from the right temporary storage unit when the controlunit receives a request to end playing back the content.

In the description provided up to now, the right of use of the contentmay have a limit by the content playback total time or may have a limitby the content playback deadline. Not limited to these, the presentinvention can be applied to the case where the right of use of thecontent has a limit by the total number of playbacks of the content.

That is to say, in the above-stated electronic device, the rightinformation may include playback number information and right numberinformation, the playback number information indicating a number ofplaybacks being a number of times the content has been played back, theright number information indicating a right number being a number oftimes the content is permitted to be played back, and the right judgingunit judges negatively when the number of playbacks indicated by theright information is equal to or larger than the right number indicatedby the right information.

With the above-described structure, when the right of use of the contenthas a limit by the total number of playbacks of the content, theelectronic device can play back the content by managing the right of useof the content.

In the above-stated electronic device, the control unit may cause theright judging unit to perform the judgment in a process of decrypting aninitial frame in the playback of the content, and prohibits the playbackof the content when the right judging unit judges negatively.

With the above-described structure, the content is not played back if,at a point in time when the playback of the content is started, thenumber of times the content has been played back has exceeded the numberof times the content is permitted to be played back.

Note that, when the right of use of the content has a limit by the totalnumber of playbacks of the content, the right may be consumed by anerroneous playback by the user, against the will of the user. This lacksprotection of the user. Also, there may be cases where the contentprovider provides a trial, permitting the user to use part of thecontent or to use it only for a limited time period, not counting it asconsumption of the right. For example, a content provider of music ormoving image contents might want to permit a use of such a contentwithin a predetermined time period for free.

In the above-stated electronic device, the control unit may include aright updating sub-unit operable to refrain from incrementing the numberof playbacks in the right information stored in the storage unit when anelapsed time since a start of a playback of the content has not exceededa predetermined time period, and to increment the number of playbackswhen the elapsed time since the start of the playback of the content hasexceeded the predetermined time period.

With the above-described structure, even if the user operateserroneously, the right of use of the content is not consumed if theplayback of the content is stopped within a predetermined time period.Also, this makes it possible for the content provider to provide a trialof the content to the user under certain conditions.

More specifically, the above-stated electronic device may furthercomprise: a clock operable to measure a time, wherein the control unitincludes: a time obtaining sub-unit operable to obtain the time measuredby the clock; a time storage sub-unit storing the time obtained by thetime obtaining sub-unit, a start time obtaining sub-unit operable tocause the time obtaining sub-unit to obtain the time when a playback ofa content is started, and stores the obtained time into the time storagesub-unit as start time information; a judgment time obtaining sub-unitoperable to cause the time obtaining sub-unit to obtain, as a judgmenttime, the time when a process of decrypting a frame to be played backNth is performed and the value N satisfies a predetermined updatecondition; an elapsed time calculating sub-unit operable to calculate anelapsed time in accordance with a difference between the judgment timeobtained by the judgment time obtaining sub-unit and a time indicated bythe start time information stored in the time storage sub-unit, and theright updating sub-unit refrains from incrementing the number ofplaybacks in the right information stored in the storage unit when theelapsed time calculated by the elapsed time calculating sub-unit has notexceeded the predetermined time period, and to increment the number ofplaybacks when the calculated elapsed time has exceeded thepredetermined time period.

The above-stated electronic device may further comprise a righttemporary storage unit having a storage area which is accessible at ahigher speed than the storage unit, wherein the control unit stores theright information stored in the storage unit, into the right temporarystorage unit, causes the right judging unit to perform the judgmentbefore the elapsed time since the start of the playback exceeds thepredetermined time period, in accordance with the right informationstored in the right temporary storage unit, and after the judgment,increments the number of playbacks indicated by the right informationstored in the right temporary storage unit, and the right updatingsub-unit stores the right information indicating the incremented numberof playbacks, stored in the right temporary storage unit, into thestorage unit when the elapsed time since the start of the playback hasexceeded the predetermined time period.

In the above-stated electronic device, the control unit may include atemporary storage deleting sub-unit operable to delete the rightinformation from the right temporary storage unit when the number ofplaybacks included in the right information stored in the storage unitby the right updating sub-unit has been incremented.

Also, in the above-stated electronic device, upon receiving a request toend playing back the content, the electronic device may delete the rightinformation from the right temporary storage unit.

In the above description, when the right of use of the content has alimit by the total number of playbacks of the content, the rightinformation is updated after the content has been played back for morethan a predetermined time period. However, not limited to this, thefollowing is possible.

That is to say, in the above-stated electronic device, the control unitmay include a right updating sub-unit operable to refrain fromincrementing the number of playbacks in the right information stored inthe storage unit until a predetermined number of frames have been playedback since a start of a playback of the content, and to increment thenumber of playbacks when the predetermined number of frames have beenplayed back.

With the above-described structure, in which the right is updateddepending on whether the electronic device has played back apredetermined number of frames, the necessity for a clock for measuringthe time or the like is eliminated.

The above-stated electronic device may further comprise a righttemporary storage unit having a storage area which is accessible at ahigher speed than the storage unit, wherein the control unit stores theright information stored in the storage unit, into the right temporarystorage unit, causes the right judging unit to perform the judgmentuntil the predetermined number of frames have been played back since thestart of the playback of the content, in accordance with the rightinformation stored in the right temporary storage unit, and after thejudgment, increments the number of playbacks indicated by the rightinformation stored in the right temporary storage unit, and the rightupdating sub-unit stores the right information indicating theincremented number of playbacks, stored in the right temporary storageunit, into the storage unit when the predetermined number of frames havebeen played back since the start of the playback of the content.

In the above-stated electronic device, the control unit may include atemporary storage deleting sub-unit operable to delete the rightinformation from the right temporary storage unit when the rightinformation indicating the incremented number of playbacks is storedinto the storage unit by the right updating sub-unit.

Also, in the above-stated electronic device, the control unit mayinclude a right information deleting sub-unit operable to, uponreceiving a request to end playing back the content from a user, deletethe right information from the right temporary storage unit.

Here, to enhance the protection of the right of use of the content, theelectronic device may have the following structure.

That is to say, in the above-stated electronic device, the rightinformation may include one or more pieces of entry information whichcorrespond, one-to-one, to one or more contents, and each piece of entryinformation is used to manage whether or not a corresponding content canbe played back, and has been encrypted using a different encryption key,the storage unit further stores a key list being a list of keys used todecrypt the one or more pieces of entry information, the key list beingstored in a state encrypted using an encryption key, the encryption keyused to encrypt the key list is stored as a list encryption key in astate protected from unauthorized accesses, the list encryption key isgenerated in accordance with a count value provided from a securecounter that is in a state protected from unauthorized accesses, thecount value of the secure counter increases or decreases at apredetermined timing, the storage unit generates a list encryption keyeach time the count value of the secure counter increases or decreases,encrypts the key list using the generated list encryption key, andstores the encrypted key list, and the right judging unit decrypts apiece of entry information corresponding to a content being a target ofjudgment, using a key contained in the key list that was decrypted usingthe list encryption key, and performs the judgment using the decryptedpiece of entry information.

When the right information is obtained in an unauthorized manner, thereis a high possibility that the content may be played back in anunauthorized manner. In regards with this, in the above-describedstructure, each piece of entry information included in the rightinformation is encrypted using a different encryption key. With such anarrangement, even if the right information is analyzed in anunauthorized manner, it is difficult to analyze the entry informationcorresponding to all the contents. That is to say, compared with thecase where the right information has been encrypted using one encryptionkey, the protection of the contents is enhanced.

Meanwhile, as described above, when the electronic device performs theprocess of updating the right information stored in the storage unit,the load placed on the electronic device increases, compared with thecase where it does not update the right information. As a result ofthis, a playback of a content or the like may be ill influenced fromthis. However, since the electronic device performs various processes,when the electronic device is operating with relatively low load, thefrequency of updating the right information stored in the storage unitmay be increased depending on the operation state of the electronicdevice, for example. With this increase of the frequency of updating theright information, when the storage unit keeps the data stored thereineven if the power supply to the electronic device is stopped, even if amalicious person stops the power supply to the electronic device toerase the consumption of the right, it is possible to make the influencefrom the unauthorized action small.

In view of this, the above-stated electronic device may further comprisean environment detection unit operable to manage an operation state ofthe electronic device, wherein the right updating sub-unit controls afrequency of performing the second process in the playback of thecontent, in accordance with the operation state managed by theenvironment detection unit.

With the above-described structure, it is possible to properly determinethe percentage of the process with a high load, such as the process ofupdating the right information stored in the storage unit, in accordancewith the operation state of the electronic device. That is to say, whenthe electronic device is performing a process with a low load, thepercentage of the process of updating the right information stored inthe storage unit is increased so that the playback of the content is notill influenced; and when the electronic device is performing a processwith a high load, the percentage of this process is decreased.

Also, the above-stated electronic device may further comprise anenvironment detection unit operable to manage an operation state of theelectronic device, wherein the right updating sub-unit controlspercentage of the first process, the second process, both the firstprocess and the second process, the third process, and the fourthprocess, in the playback of the content, in accordance with theoperation state managed by the environment detection unit.

With the above-described structure, it is possible to change thepercentage of the process of updating the right information stored inthe storage unit and the percentage of the judgment process performed bythe right judging unit.

Note that the operation state of the electronic device includes thefollowing specific cases.

In the above-stated electronic device, the environment detection unitmay manage a CPU use rate of the electronic device, and the rightupdating sub-unit may control percentage of frames for the secondprocess in accordance with the CPU use rate, in a playback of a content.

With the above-described structure, it is possible to control thepercentage of the process of updating the right information stored inthe storage unit, in accordance with the CPU use rate of the electronicdevice.

Also, in the above-stated electronic device, the environment detectionunit may manage a content playback time, and the right updating sub-unitmay execute the second process when the playback time managed by theenvironment detection unit exceeds a predetermined time.

With the above-described structure, it is possible to update the rightinformation stored in the storage unit when the content playback timeexceeds the predetermined time. This prevents occurrence of a problemthat although a content is being played back, the right information isnot updated for a long time.

Also, the above-stated electronic device may have a multi-task function,the environment detection unit may manage the number of applicationsthat have been activated simultaneously, and the right updating sub-unitmay control the percentage of the frames for the second process inaccordance with the number of applications that have been activatedsimultaneously, managed by the environment detection unit, during aplayback of a content.

With the above-described structure, it is possible to control thepercentage of the process of updating the right information stored inthe storage unit, in accordance with the number of applications thathave been activated in the electronic device. For example, when arelatively large number of applications have been activated, thepercentage of the process of updating the right information may bereduced.

Also, in the above-stated electronic device, the environment detectionunit may manage types of contents to be played back, and the rightupdating sub-unit may control the percentage of the frames for thesecond process in accordance with the types of contents managed by theenvironment detection unit, in a playback of a content.

With the above-described structure, it is possible to control thepercentage of the process of updating the right information, by takinginto account the process load of the electronic device required for theplayback of each type of content. For example, when a moving image,which has a higher load of content playback process than music, is to beplayed back, the percentage of the process of updating the rightinformation may be reduced, and when music is to be played back, thepercentage of the process of updating the right information may beincreased.

Also, in the above-stated electronic device, the environment detectionunit may manage whether or not the electronic device is in an idlestate, and the right updating sub-unit may control the percentage of theframes for the second process depending on whether the electronic deviceis in the idle state, in a playback of a content.

With the above-described structure, it is possible to control thepercentage of the process of updating the right information, dependingon whether the electronic device is in the idle state, in a playback ofa content. For example, when the electronic device is in the idle state,the percentage of the process of updating the right information may beincreased, and when the electronic device is not in the idle state, thepercentage of the process of updating the right information may bedecreased.

Also, in the above-stated electronic device, the environment detectionunit may manage whether or not the electronic device is operating in apower saving mode, and the right updating sub-unit may control thepercentage of the frames for the second process depending on whether theelectronic device is operating in the power saving mode.

With the above-described structure, it is possible to control thepercentage of the process of updating the right information, dependingon whether the electronic device is operating in the power saving mode.For example, when the electronic device is not operating in the powersaving mode, the percentage of the process of updating the rightinformation may be increased, and when the electronic device isoperating in the power saving mode, the percentage of the process ofupdating the right information may be decreased.

Here, to enhance the protection of the right of the content in theabove-stated electronic device, the following is possible.

That is to say, in the above-stated electronic device, the control unitmay include a tamper detection sub-unit operable to perform a tamperdetection onto part or all of the electronic device at eachpredetermined timing.

With the above-described structure in which a tamper detection isperformed onto part or all of the electronic device at eachpredetermined timing, it is possible to reduce the possibility that thecontent is played back in an unauthorized manner.

In the above-stated electronic device, the tamper detection sub-unit,while performing the tamper detection onto part or all of the electronicdevice, may perform the tamper detection onto part of the electronicdevice that has not been subjected to tamper detection, each time thetamper detection sub-unit detects a tamper.

There may be a case where it is difficult to perform a tamper detectiononto the whole electronic device at once. More specifically, forexample, there may be a case where an attempt to perform the tamperdetection onto the whole electronic device at once causes an errorbecause it places too much load onto the performance of the electronicdevice. Even in such a case, with the above-described structure, it ispossible to perform the tamper detection onto each part of theelectronic device at each timing of the tamper detection. Accordingly,with the above-described structure, it is possible to perform the tamperdetection by taking into account the performance ability of theelectronic device.

Note that the target of the tamper detection includes the following.

That is to say, in the above-stated electronic device, the tamperdetection sub-unit may perform the tamper detection onto a playbackapplication being an application that performs a content playbackprocess.

With the above-described structure, it is possible to detect whether ornot the application for performing a content playback process has beentampered, and thus it is possible to reduce the possibility that thecontent may be played back in an unauthorized manner.

The above-stated electronic device may further comprise a usernotification unit operable to notify a user, wherein when the tamperdetection sub-unit detects a tamper, the user notification unit notifiesthe user that the application needs to be updated.

With the above-described structure, it is possible to urge the user toupdate an application when a tamper is detected in the application. Thisallows the user to execute an authorized application by the update,resulting in reduction in the possibility that the content may be playedback in an unauthorized manner.

In the above-stated electronic device, when the tamper detectionsub-unit detects a tamper, the control unit may stop the playbackapplication.

With the above-described structure, it is possible to prevent thecontent from being played back by an unauthorized application.

Here, the timing of tamper detection includes the following.

That is to say, in the above-stated electronic device, the tamperdetection sub-unit may perform the tamper detection at a timing when theright information stored in the storage unit is accessed, in a processof decrypting a frame.

Also, the tamper detection sub-unit may perform the tamper detection ina process of decrypting an initial frame in the playback of the content.

Also, the tamper detection sub-unit may perform the tamper detectioneach time a predetermined number of frames are decrypted, in theplayback of the content.

Also, the tamper detection sub-unit may perform the tamper detection ata timing when the right judging unit performs the judgment.

Also, the control unit may include a tamper detection sub-unit operableto perform a tamper detection onto the electronic device at apredetermined timing, and the tamper detection sub-unit may perform thetamper detection at a timing when the count value of the secure counterincreases or decreases.

Also, the control unit may include a tamper detection sub-unit operableto perform a tamper detection onto the electronic device at apredetermined timing, and the tamper detection sub-unit may perform thetamper detection at a timing when a playback application is installed orupdated, the playback application being an application that performs acontent playback process.

The above-described object is also fulfilled by a content playbackcontrol method for managing a right of use of a content and controllingplayback of the content, using right information for managing whether ornot the content can be played back, the right information stored in astorage unit protected from unauthorized accesses, the content playbackcontrol method comprising the steps of: receiving, one by one, aplurality of frames that constitute the content in an encrypted state;performing a judgment on whether or not the content is permitted to beplayed back, in accordance with the right information; and causing thejudgment performing step to perform the judgment each time a value N ofa frame that is represented as an Nth frame and received in thereceiving step satisfies a predetermined judgment condition, decryptingthe Nth frame when the right judging step judges affirmatively, andrestricting the playback of the content with respect to frames after theNth frame when the right judging step judges negatively, the value Nbeing a natural number indicating a position of a frame in an order ofplayback of the frames constituting the content.

The above-described object is also fulfilled by a control program forcausing an electronic device to perform a process of managing a right ofuse of a content and controlling playback of the content, using rightinformation for managing whether or not the content can be played back,the right information stored in a storage unit protected fromunauthorized accesses, the control program comprising the steps of:receiving, one by one, a plurality of frames that constitute the contentin an encrypted state; performing a judgment on whether or not thecontent is permitted to be played back, in accordance with the rightinformation; and causing the judgment performing step to perform thejudgment each time a value N of a frame that is represented as an Nthframe and received in the receiving step satisfies a predeterminedjudgment condition, decrypting the Nth frame when the right judging stepjudges affirmatively, and restricting the playback of the content withrespect to frames after the Nth frame when the right judging step judgesnegatively, the value N being a natural number indicating a position ofa frame in an order of playback of the frames constituting the content.

The above-described object is also fulfilled by a computer-readablerecording medium storing a control program for causing an electronicdevice to perform a process of managing a right of use of a content andcontrolling playback of the content, using right information formanaging whether or not the content can be played back, the rightinformation stored in a storage unit protected from unauthorizedaccesses, the control program comprising the steps of: receiving, one byone, a plurality of frames that constitute the content in an encryptedstate; performing a judgment on whether or not the content is permittedto be played back, in accordance with the right information; and causingthe judgment performing step to perform the judgment each time a value Nof a frame that is represented as an Nth frame and received in thereceiving step satisfies a predetermined judgment condition, decryptingthe Nth frame when the right judging step judges affirmatively, andrestricting the playback of the content with respect to frames after theNth frame when the right judging step judges negatively, the value Nbeing a natural number indicating a position of a frame in an order ofplayback of the frames constituting the content.

The above-described object is also fulfilled by an integrated circuitthat manages a right of use of a content and controls playback of thecontent, using right information for managing whether or not the contentcan be played back, the right information stored in a storage unitprotected from unauthorized accesses, the integrated circuit comprising:a receiving unit operable to receive, one by one, a plurality of framesthat constitute the content in an encrypted state; a right judging unitoperable to perform a judgment on whether or not the content ispermitted to be played back, in accordance with the right information;and a control unit operable to cause the right judging unit to performthe judgment each time a value N of a frame that is represented as anNth frame and received in the receiving step satisfies a predeterminedjudgment condition, operable to decrypt the Nth frame when the rightjudging unit judges affirmatively, and operable to restrict the playbackof the content with respect to frames after the Nth frame when the rightjudging unit judges negatively, the value N being a natural numberindicating a position of a frame in an order of playback of the framesconstituting the content.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram of the electronic device 1 in thepresent invention.

FIG. 2 is a functional block diagram of the right judgment decryptionunit 15.

FIGS. 3A to 3D show the content 21, the content management table 22, thecontent decryption request 23, and the playback state information.

FIG. 4 shows the right management table 25.

FIGS. 5A and 5B show description of operation patterns of the decryptioncontrol unit 57, and relationships between each pattern and frames to beplayed back.

FIGS. 6A and 6B show the table 26 a indicating the CPU use rates of theelectronic device 1 in correspondence with the percentages of thepatterns, and the writing condition table 26 b.

FIG. 7 is a flowchart showing details of the operation of the controlprocedure determining unit 52.

FIG. 8 is a flowchart showing details of the operation of the decryptioncontrol unit 57.

FIG. 9 is a flowchart of the pattern Q process performed in step S211 bythe decryption control unit 57.

FIG. 10 is a flowchart showing details of the operation of the rightjudging unit 58.

FIG. 11 is a flowchart showing the operation of the right judging unit58 during the playback of the content.

FIG. 12 shows an outline of the operation of the right judgmentdecryption unit 15.

FIG. 13 shows an outline of the operation of the right judgmentdecryption unit 15.

FIG. 14 is a flowchart showing the operation when the content managementunit 10 of the electronic device 1 plays back a content.

FIG. 15 is a flowchart showing the operation of the right judging unit58 when the right type is “limit by period”.

FIG. 16 is a flowchart showing the operation of the right judging unit58 during a playback of a content when the right type is “limit byperiod”.

FIG. 17 is a flowchart showing the operation of the decryption controlunit 57 when a content of the right type “limit by number” is playedback and the playback state information has not been set to the initialvalue.

FIG. 18 is a flowchart showing the operation of the right judging unit58 when the right type is “limit by number”.

FIG. 19 is a flowchart showing the operation of the right judging unit58 when the right type is “limit by number” and when the playback stateinformation has not been set to the initial value.

FIG. 20 is a flowchart showing the operation of the decryption controlunit 57.

FIG. 21 is a flowchart showing the operation of the decryption controlunit 57 updating the right management table 25 in the storage area 20when the value of the playback state information has reached thepredetermined value in the middle of a playback of a content.

FIG. 22 is a flowchart showing the operation of the right judging unit58.

FIG. 23 is a flowchart showing the operation performed when the playbackstate information is received from the decryption control unit 57 in themiddle of a playback of a content.

FIG. 24 shows the right management table 25, the encryption key list 28,the list encryption key 33, and the secure counter in Modification 1.

FIG. 25 shows an example case where the tamper detection is performedfor each predetermined frame.

FIG. 26 is a functional block diagram of a right judgment decryptionunit 15 b in Modification 3.

DETAILED DESCRIPTION OF THE INVENTION 1. Embodiment 1

The following will describe an embodiment of the present invention, withreference to the attached drawings.

In the following embodiment, used as an example is an electronic device1 that plays back a content while managing the rights of the use of thecontent. The rights of the use of the content are, for example, acontent playback time period, playback deadline, and the number ofplaybacks. The rights of the use of the content will be described laterin detail.

1.1 Summary

A summary of the electronic device 1 will be described with reference tothe drawings.

The electronic device 1 shown in FIG. 1, specifically, has acommunication function, and obtains a content via a network by using acontent distribution service or the like. The electronic device 1, forexample, a set top box, television, HDD (Hard Disk Drive)/DVD (DigitalVideo Disc) recorder, game device, mobile telephone, or PDA beingprovided with the communication function. Here, the content is, forexample, a moving image, still image, music, map or the like. Ingeneral, the content is distributed in the encrypted state.

Also, the electronic device 1 obtains the right information which isused for managing the right of use of content, with use of thecommunication function. The electronic device 1 performs decryption andplayback of the content by referring to the right information.

Here, when decrypting an encrypted content and playing back thedecrypted content, the electronic device 1 performs the confirmation onright and decryption and playback of the content in units of frames ofthe codec for the content. As shown in FIG. 3A, a content 21 is composedof a plurality of frames. Also, as a supplemental comment to the frames,in an audio compression codec such as the AAC (Advanced Audio Codec), anaudio signal is grouped into blocks per a predetermined number ofsamples, for example. In this case, each block is processed as oneframe. In general, the decoder side performs the playback of content inunits of frames.

Note that the electronic device 1 stores the obtained right informationinto the storage area 20, stores at least part of the right informationinto the right temporary storage unit 59, shown in FIG. 2, that can beaccessed at a high speed, and while the content is being played back,sequentially performs the judgment and update of the right using theentry information stored in the right temporary storage unit 59. Theentry information is information used for making a judgment on theright, and will be described in detail later. The electronic device 1writes the updated entry information stored in the right temporarystorage unit 59 into the storage area 20, in accordance with the numberplayed-back frames. With this structure, it is possible to perform theconfirmation on the right and update of the right, while making theright information in the storage area 20 reflect the contents of theupdate. With this structure, even if a malicious person stops the powersupply to the right temporary storage unit 59 to erase the storagecontents thereof to erase the data indicating, for example, theconsumption of the time permitted to play back the content by right, theright information having been updated to some extent and written intothe storage area can be preserved. This enables the advantage obtainedby the malicious person to be reduced.

Note that, although in the above description, the content is obtainedwith use of the communication function, the communication function maynot necessarily be used to obtain the content. For example, a recordingmedium such as an SD memory card may be attached to the electronicdevice 1, and the content recorded on the recording medium may beobtained.

1.2 Structure

Next, the structure of the electronic device 1 will be describedspecifically.

FIG. 1 is a functional block diagram of the electronic device 1 in thepresent invention.

As shown in FIG. 1, the electronic device 1 includes a contentmanagement unit 10, a storage area 20, a time change key storage unit30, and a secure clock 40.

1.2.1 Content Management Unit 10

The content management unit 10 plays back an obtained content whilemanaging the rights of the use of the content. The content managementunit 10 will be described later in detail.

1.2.2 Storage Area 20

The storage area 20 stores one or more contents 21 (content 21 a,content 21 b, . . . ) obtained by the electronic device 1. The storagearea 20 also stores management information (right management table 25).Note that the right management table 25 has been encrypted using a timechange key 31 stored in the time change key storage unit 30 which willbe described later. It is preferred that, to prevent a malicioustampering, the contents or the right management table 25 stored in thestorage area 20 are stored in the encrypted state, or the storage area20 itself is achieved by a secure flash or the like that has a mechanismfor preventing unauthorized accesses. In the present embodiment, thecontents are encrypted by an encryption algorithm such as AES (AdvancedEncryption Standard) based on the assumption that the user of theelectronic device 1 may re-distribute a content to another user ofanother electronic device. Note that the encryption algorithm used forencrypting the contents is not limited to the AES, but may be any otherencryption algorithm. Note also that the decryption key used fordecrypting an encrypted content is contained in the right managementtable 25. Also, in the present embodiment, to prevent the encryptedcontents or the like from being analyzed, the storage area 20 has amechanism for preventing unauthorized accesses. Note that contents, theright management table 25 and the like may be stored in the encryptedstate in a storage having a mechanism for preventing unauthorizedaccesses.

Here will be described the right management table 25 stored in thestorage area 20.

FIG. 4 shows the right management table 25.

As shown in FIG. 4, each piece of record (hereinafter referred to as“entry information”) contained in the right management table 25 includesa content ID 25 a, a content key 25 b, a right type 25 c, a playbacknumber 25 d, a right number 25 e, a playback total time 25 f, a playbackright time 25 g, and a playback deadline 25 h.

The content ID 25 a indicates an identifier of a content.

The content key 25 b is a decryption key used to decrypt the contentindicated by the content ID 25 a. When the content has been encrypted bythe AES as an encryption algorithm, the decryption key should be 128-bitor 192-bit information.

The right type 25 c indicates a type of right for the content indicatedby the content ID 25 a. The right type will be described in detaillater.

The playback number 25 d indicates the number of times that the contentindicated by the content ID 25 a has been played back. Each time thecontent is played back, the value of the playback number 25 d isupdated.

The right number 25 e the number of times that the content indicated bythe content ID 25 a is permitted to be played back.

The playback total time 25 f indicates a total time in which the contentindicated by the content ID 25 a was played back. Each time the contentis played back, the value of the playback total time 25 f is updated asmuch as the playback time thereof.

The playback right time 25 g indicates a total time permitted for thecontent indicated by the content ID 25 a to be played back.

The playback deadline 25 h indicates a deadline by which the contentindicated by the content ID 25 a is permitted to be played back.

Here will be described the right type. The right type indicates how theright to use a content is limited. In the present embodiment, there arefive right types: “limit by number”, “limit by period”, “limit by time”,“limit by period/number”, and “unlimited”.

The right type “limit by number” is a right type where the contentprovider preliminarily sets the upper limit for the number of times thatthe content can be played back. With reference to FIG. 4, in an examplewhere the content ID 25 a is “001”, the playback number 25 d and theright number 25 e indicate that the user has consumed one of five timesthat the user is permitted to play back the content.

The right type “limit by period” is a right type where the contentprovider preliminarily sets a time period during which the content canbe played back. With reference to FIG. 4, in an example where thecontent ID 25 a is “002”, the playback deadline 25 h indicates that thelast day of the playback time period is Mar. 31, 2006.

The right type “limit by time” is a right type where the contentprovider preliminarily sets the total time in which the content can beplayed back. With reference to FIG. 4, in an example where the contentID 25 a is “003”, the playback right time 25 g indicates that the timepermitted for the playback is 20 minutes in total, and the playbacktotal time 25 f indicates that the user consumed six minutes out of thepermitted 20 minutes for playback.

The right type “limit by period/number” is a right type where thecontent provider preliminarily sets the time period during which thecontent can be played back, and also sets the upper limit for the numberof times that the content can be played back within the set time period.It is a combination of the right types “limit by period” and “limit bynumber”. That is to say, the playback of the content is prohibited whenconditions in regards with both of the right types “limit by period” and“limit by number” are not satisfied (when the permitted playback periodexpires and the permitted number of times is consumed). Note that,alternatively to this arrangement, the playback of the content may beprohibited when a condition in regards with either the right type “limitby period” or “limit by number” is not satisfied (when the permittedplayback period expires or the permitted number of times is consumed).With reference to FIG. 4, in an example where the content ID 25 a is“004”, the playback deadline 25 h indicates that the last day of theplayback time period is Mar. 31, 2006, the playback number 25 d and theright number 25 e indicate that the user has consumed three of ten timesthat the user is permitted to play back the content.

The right type “unlimited” is a right type where there is no limit tothe time period or the number of times that the content can be playedback. Note that the names of the right types are not limited to thoseprovided above. Also, right types other than those explained above maybe provided to be managed in the right management table 25.

Here, back to the description of the storage area 20, the storage area20 may be achieved by a storage medium, such as a nonvolatile memory orHDD, that keeps on storing data even when power is not supplied thereto.

As described earlier, the storage area 20 has a mechanism for preventingunauthorized accesses. This requires the processes for encrypting anddecrypting data, and processes for confirming the authenticity of a userwho is requesting an access thereto. Accordingly, it is difficult toaccess the storage area 20 at high speeds.

1.2.3 Time Change Key Storage Unit 30

The time change key storage unit 30 is a storage unit, such as a securememory, that has a mechanism for preventing unauthorized accesses, andstores the time change key 31.

As described earlier, the time change key 31 is an encryption key usedfor encrypting the right management table 25. The time change keystorage unit 30 generates the time change key 31 based on a count valueprovided by a secure counter that is not illustrated. The secure countercounts up at a predetermined timing. For example, the secure countercounts up each time a predetermined number of frames in a content isdecrypted. Each time the count value of the secure counter changes, thetime change key 31 is generated. And each time the time change key 31 isgenerated, the time change key storage unit 30 updates the time changekey 31 stored therein. Note that, each time the time change key 31 isgenerated, the right management table 25 in the storage area 20 isdecrypted with use of the time change key 31 before the update, and isencrypted with use of the time change key 31 after the update. That isto say, the right management table 25 is always re-encrypted with use ofthe newest time change key 31.

1.2.4 Secure Clock 40

The secure clock 40 measures the time, and, upon request by the timeinformation obtaining unit 55, outputs a measured time as the timeinformation. The secure clock 40 has a mechanism for preventingunauthorized accesses, and it is difficult for an unauthorized person torewrite the secure clock 40.

The secure clock 40 measures the time in several units including days.That is to say, the secure clock 40 measures the time in units of month,day, hour, minute, second, and a unit smaller than second, for example,1/30 second. However, the time for use is not limited to this. Forexample, information of the dates may be stored in other location, andthe secure clock 40 may not measure the dates.

1.2.5 Detail of Content Management Unit 10

Here will be described the detail of the content management unit 10.

As shown in FIG. 1, the content management unit 10 includes a playbackrequest receiving unit 11, a content judging unit 12, a contentextracting unit 13, a decryption request transmitting unit 14, a rightjudgment decryption unit 15, a playback unit 16, and a user notificationunit 17.

Note that, since the content management unit 10 plays back a contentwhile managing the rights of the use of the content, it is preferablethat the content management unit 10 is protected from unauthorizedaccesses such as tampering. It is thus preferable that part or all ofthe content management unit 10 is implemented to be tamper-resistant.For implementing the content management unit 10 to be tamper-resistant,for example, a technology disclosed in International PublicationPamphlet WO 2004/013744 A2 may be used.

1.2.6 Playback Request Receiving Unit 11

The playback request receiving unit 11 receives specification of acontent to be played back, the specification being made by an operationof the user. For example, the content management unit 10 displays a listof contents on a display unit (not illustrated), and the user performsan operation onto an operation unit (not illustrated) to select acertain content. This enables the playback request receiving unit 11 toreceive specification by the user of a content to be played back.

1.2.7 Content Judging Unit 12

The content judging unit 12 identifies the content ID and the standardinformation in correspondence with the content specified by the user.The content judging unit 12 outputs the identified content ID andstandard information to the content extracting unit 13. Note that thestandard information is mainly used to identify the right judgmentdecryption unit 15, and the content ID is mainly used to read thecontent from the storage area 20 and to identify the limit to the rightin regards with the content (the right type 25 c).

Note that the standard information is information that indicates a codecof the content. Examples of codecs are: AAC in case the content ismusic; MPEG2 (Motion Picture Expert Group 2) in case the content is amoving picture; and JPEG (Joint Photographic Expert Group) in case thecontent is a static picture.

1.2.8 Content Extracting Unit 13

The content extracting unit 13 reads out the playback-target contentfrom the storage area 20.

More specifically, the content extracting unit 13 stores a contentmanagement table 22 shown in FIG. 3B. As shown in FIG. 3B, each piece ofrecord contained in the content management table 22 includes a contentID 22 a and a file name 22 b. The content ID 22 a indicates anidentifier of a content. The file name 22 b indicates a location, in thedirectory structure of the storage area 20, in which the content isstored. Note that the correspondence between the location in thedirectory and the address in the storage area 20 is managed by the OS(Operating System) of the electronic device 1.

The content extracting unit 13 receives the standard information andcontent ID from the content judging unit 12. The content extracting unit13, based on the content management table 22, identifies the location inthe storage area 20 where the content identified by the content ID isstored. The content extracting unit 13 then reads out the content fromthe identified location in the storage area 20.

The content extracting unit 13 outputs the read-out content and thestandard information and content ID received from the content judgingunit 12, to the decryption request transmitting unit 14.

Note that the whole content may be read out at once, or the content maybe read out from the storage area 20 in a unit of a predetermined sizeof data, such as 50 KB of data.

1.2.9 Decryption Request Transmitting Unit 14

The decryption request transmitting unit 14 identifies, from among oneor more right judgment decryption units 15, a right judgment decryptionunit 15 to be used for decrypting a content. The decryption requesttransmitting unit 14 then outputs the content in units of frames to theidentified right judgment decryption unit 15. Note that the rightjudgment decryption units 15 are provided in correspondence with thestandard information for the contents on a one-to-one basis.

More specifically, the decryption request transmitting unit 14 receivesa content, a content ID, and a piece of standard information from thecontent extracting unit 13, identifies a right judgment decryption unit15 based on the received standard information, analyzes the frames ofthe content, and outputs a content decryption request for everypredetermined number of frames, for example, for every frame, to theidentified right judgment decryption unit 15, where the contentdecryption request requests decryption of a content.

FIG. 3C shows a content decryption request 23. As shown in FIG. 3C, thecontent decryption request 23 includes a flag 23 a, a content ID 23 b,and a frame 23 c. The flag 23 a indicates whether or not a contentdecryption request, which requests decryption of the content identifiedby the content ID 23 b, is output for the first time. The content ID 23b indicates an identifier of the content concerning the contentdecryption request 23. The frame 23 c is a predetermined number offrames being a decryption target of the content decryption request 23.

The decryption request transmitting unit 14 turns on the flag 23 a ofthe content decryption request 23 when it outputs the content decryptionrequest 23 to the right judgment decryption unit 15 for the first timein regards to content after a playback of the content is started.

When receiving, from the playback unit 16, a stop request requesting tostop transmission of frame, the decryption request transmitting unit 14stops outputting the content decryption request 23 to the right judgmentdecryption unit 15.

1.2.10 Right Judgment Decryption Unit 15

The right judgment decryption unit 15 makes judgments on the right of acontent, and controls the playback of the content based on the result ofthe judgments.

More specifically, the right judgment decryption unit 15 receives thecontent decryption request 23 from the decryption request transmittingunit 14, and makes judgments on the right based on the contentdecryption request 23. When it judges that the user has the right to usethe content, the right judgment decryption unit 15 outputs the playbackpermission information and the decrypted frames to the playback unit 16;and when it judges that the user does not have the right to use thecontent, the right judgment decryption unit 15 outputs the playbacknon-permission information to the playback unit 16.

The right judgment decryption unit 15 initializes the data it holds whenthe flag 23 a in the received content decryption request 23 has beenturned on. In this initialization, for example, the data stored in theright temporary storage unit 59, which will be described later, and thecontent key held by the content decrypting unit 61 are deleted. Theseinformation are deleted so as to prevent an unauthorized access to thekey information or the like that was used in the previous playback ofcontent and is held by the right judgment decryption unit 15. The rightjudgment decryption unit 15 will be described in detail later. The rightjudgment decryption unit 15 makes judgments on the right and decryptscontents. For this reason, it is preferable that the right judgmentdecryption unit 15, especially among the components of the contentmanagement unit 10, is implemented to be tamper-resistant.

As described above, the right judgment decryption unit 15 deletes partof the data it holds when the flag 23 a has been turned on. However, notlimited to this, a space in the memory may be allocated to a contentplayback process when the flag 23 a has been turned on.

1.2.11 Playback Unit 16

The playback unit 16 controls the playback of content in accordance withthe processing results of the right judgment decryption unit 15.

More specifically, when receiving the playback permission informationand the decrypted frames from the right judgment decryption unit 15, theplayback unit 16 decodes the frames and outputs decoded data to anoutput unit (not illustrated).

Also, when receiving the playback non-permission information from theright judgment decryption unit 15, the playback unit 16 requests theuser notification unit 17 to notify the user that the user does not havethe right to play back. The playback unit 16 further outputs a stoprequest, which instructs to stop transmitting frames, to the decryptionrequest transmitting unit 14.

1.2.12 User Notification Unit 17

The user notification unit 17 notifies the user of a message bydisplaying the message on a display unit (not illustrated), outputtingthe message as voices/sounds through a speaker or the like.

Especially, the user notification unit 17 notifies the user of a messageindicating whether or not the user has the right to use a content. As aspecific notification method, a dialog may be displayed, or a beep soundmay be output. And not limited to these methods, any known or commonnotification method using an image or voices/sounds may be used.

When the electronic device 1 supports music distribution or the like, itmay notify the user of a message that urges the user to buy a right touse a content. For example, the message urging the user to buy a rightmay be notified to the user when the expiration of the right (forexample, a right to play back a content) owned by the user is nearing,as well as when it is judged that the user does not have the right.

1.3 Detail of Right Judgment Decryption Unit 15

Here will be described the detail of the right judgment decryption unit15.

FIG. 2 is a functional block diagram of the right judgment decryptionunit 15.

As shown in FIG. 2, the right judgment decryption unit 15 includes adecryption request receiving unit 51, a control procedure determiningunit 52, a key obtaining unit 53, a right management table access unit54, a time information obtaining unit 55, a playback state storage unit56, a decryption control unit 57, a right judging unit 58, a righttemporary storage unit 59, a start time storage unit 60, and a contentdecrypting unit 61.

1.3.1 Decryption Request Receiving Unit 51

The decryption request receiving unit 51 receives the content decryptionrequest 23 from the decryption request transmitting unit 14. Thedecryption request receiving unit 51 then outputs the frame of thecontent contained in the content decryption request 23, to the contentdecrypting unit 61. The decryption request receiving unit 51 alsooutputs the content ID to the control procedure determining unit 52.

1.3.2 Control Procedure Determining Unit 52

The control procedure determining unit 52, when a playback of a contentis started, determines a control procedure that indicates the procedureof the content right judgment and decryption.

It is presumed that the control procedure is preliminarily stored in astorage unit such as a predetermined memory, in correspondence with theright types on a one-to-one basis. The control procedure determiningunit 52 receives a content ID from the decryption request receiving unit51, obtains the right management table 25, and obtains a right type ofthe content from the content ID and the right management table 25. Thecontrol procedure determining unit 52 then reads a control procedurecorresponding to the obtained right type, and outputs the controlprocedure to the decryption control unit 57.

The operation of the control procedure determining unit 52 will bedescribed in detail later.

1.3.3 Key Obtaining Unit 53

The key obtaining unit 53, depending on the operation of the controlprocedure determining unit 52 and the control of the decryption controlunit 57, obtains the time change key 31 from the time change key storageunit 30, where the time change key 31 is used for encrypting the rightmanagement table 25.

1.3.4 Right Management Table Access Unit 54

The right management table access unit 54 accesses the right managementtable 25 in the storage area 20. More specifically, the right managementtable access unit 54, depending on the operation of the controlprocedure determining unit 52 and the control of the decryption controlunit 57, performs a process such as reading out the right managementtable 25 from the storage area 20.

1.3.5 Time Information Obtaining Unit 55

The time information obtaining unit 55, depending on the control of thedecryption control unit 57, obtains the time information from the secureclock 40.

1.3.6 Playback State Storage Unit 56

The playback state storage unit 56 stores the playback state informationthat indicates how many frames have been played back since a contentconcerned started to be played back. The playback state informationindicates it by, for example, the number of frames having been playedback, as shown in FIG. 3D. It is presumed here that the initial value ofthe playback state information is 0. Also, when the flag 23 a in thecontent decryption request 23 received by the decryption requestreceiving unit 51 has been turned on, the value of the playback stateinformation returns to the initial value 0.

The playback state storage unit 56 stores the content ID of the contentbeing played back by the electronic device 1, the control proceduredetermined by the control procedure determining unit 52, and a playbackpermission flag that indicates whether or not a playback of the contentis permitted.

1.3.7 Decryption Control Unit 57

The decryption control unit 57 receives the control procedure from thecontrol procedure determining unit 52, and according to the receivedcontrol procedure, controls the processing. More specifically, dependingon the number indicated in the playback state information, namely, thenumber of played-back frames, the decryption control unit 57 causes theright judging unit 58 to make a judgment on the right, controlsdetermination on whether or not to perform decryption based on thejudgment result, updates the right management table 25 or the like.

More specifically, in the present embodiment, the decryption controlunit 57 can perform four patterns of processes as shown in FIG. 5A,using the right judging unit 58 and the like. The procedures for thefour patterns of processes are indicated in the control proceduredetermined by the control procedure determining unit 52.

Here, a supplementary explanation will be provided in regards with FIG.5A. FIG. 5A shows that confirmation of right and update of right areconducted in the pattern P process. The confirmation of right hererefers to the process performed by the right judging unit 58. Also, theupdate of right refers to the update of the entry information stored inthe right temporary storage unit 59 which will be described later.

In the pattern Q process, the confirmation of right, update of right,and writing of right are conducted. The writing of right refers to theprocess where the right management table 25 is read out from the storagearea 20, the right management table 25 is updated to reflect the updateof the entry information stored in the right temporary storage unit 59,and the updated right management table 25 is written to the storage area20.

In the pattern R process, the confirmation of right is conducted. Thatis to say, update of the entry information stored in the right temporarystorage unit 59 is not performed.

In the pattern S process, frames are decrypted without the confirmationof right or the like. The frames are decrypted also in the pattern P, Q,R processes when it is confirmed that the right to use the content isvalid.

In the present embodiment, as shown in FIG. 5B, each frame to be playedback is assigned with one of the four patterns of processes. Morespecifically, the four patterns are assigned one by one cyclically toeach of the frames aligned in the order of playback. The decryptioncontrol unit 57 stores the frame numbers N (each frame being identifiedas N^(th) frame in the order of playback, starting with 1, N being anatural number) in correspondence with the four patterns of processesthat are assigned as described above. In the case of an example shown inFIG. 5B, when the obtained playback state information indicates “2”, itindicates that two frames have already been played back, and thus thedecryption control unit 57 performs the pattern Q process correspondingto the third frame (N=3).

Note that, not limited to the above-described assignment method whereeach value of N is assigned with any of the four patterns, each framewhose value of N satisfies a predetermined equation may be assigned witha predetermined pattern of process. For example, the pattern P processmay be performed for each frame whose value of N is an odd number(satisfying equation “N=2n+1”, where “n” being an integer of 0 orhigher), and the pattern Q process may be performed for each frame whosevalue of N is an even number (satisfying equation “N=2n”, where “n”being an integer of 1 or higher).

The operation of the decryption control unit 57 will be described indetail later.

1.3.8 Right Judging Unit 58

The right judging unit 58 judges, based on the information received fromthe decryption control unit 57, whether or not the right to use thecontent is valid, and outputs the result of the judgment to thedecryption control unit 57. The right judging unit 58 stores the entryinformation of the content for playback into the right temporary storageunit 59 before it performs the judgment. The right judging unit 58updates and outputs the entry information stored in the right temporarystorage unit 59, under the control of the decryption control unit 57.

The operation of the right judging unit 58 will be described in detaillater.

1.3.9 Right Temporary Storage Unit 59

The right temporary storage unit 59 is a storage medium that isaccessible at a higher speed than the storage area 20. The righttemporary storage unit 59 is, for example, a volatile memory.

The right temporary storage unit 59 stores the entry information that isused for the judgment on the right. It is presumed that, since the righttemporary storage unit 59 is accessible at a higher speed than thestorage area 20, the entry information stored in the right temporarystorage unit 59 is not in the encrypted state. For this reason, comparedwith a case where the right management table 25 is read out from thestorage area 20 for each update, the entry information stored in theright temporary storage unit 59 can be updated at a high speed inparallel with the playback of the content. With this structure, forexample, a playback of a content can be stopped immediately when theplayback total time 25 f for the playback of the content reaches thetime indicated by the playback right time 25 g.

However, since the high-speed access is prioritized over the encryption,the right temporary storage unit 59 has less security strength than thestorage area 20. Also, the right temporary storage unit 59 may berealized by, for example, a volatile memory so as to achieve thehigh-speed access. In that case, the data stored therein is erased whenthe power supply thereto is stopped. This means that the entryinformation having been updated and stored in the right temporarystorage unit 59 may be erased. This mechanism may be abused by amalicious person. That is to say, the malicious person may stop thepower supply thereto to erase the entry information that was updatedwhen the person consumed the right, so that the consumption of the rightis not recognized correctly. To prevent such an abuse, in the presentembodiment, the decryption control unit 57 performs the pattern Qprocess at a predetermined timing so that the right management table 25in the storage area 20 reflects the contents of updates made onto theentry information stored in the right temporary storage unit 59.

As described above, the right temporary storage unit 59 is realized by avolatile memory to achieve the high-speed access thereto. However, notlimited to this, the right temporary storage unit 59 may be realized bya nonvolatile memory in so far as it does not interfere with theplayback of content, or the entry information may be stored in the righttemporary storage unit 59 in the encrypted state.

1.3.10 Start Time Storage Unit 60

The start time storage unit 60 stores time information that is used inthe judgment made by the right judging unit 58. The time information isobtained by the time information obtaining unit 55.

1.3.11 Content Decrypting Unit 61

The content decrypting unit 61 decrypts frames constituting contents,under the control of the decryption control unit 57.

More specifically, the content decrypting unit 61 receives frames fromthe decryption request receiving unit 51. The content decrypting unit 61also receives the playback permission information or the playbacknon-permission information from the decryption control unit 57. Thecontent decrypting unit 61 further receives the content key from thedecryption control unit 57. The content decrypting unit 61 stores thereceived content key. The content decrypting unit 61, upon receiving theplayback permission information from the decryption control unit 57,decrypts a frame using the received content key, and outputs thedecrypted frame and the playback permission information to the playbackunit 16. Upon receiving the playback non-permission information from thedecryption control unit 57, the content decrypting unit 61 does notdecrypt a frame, and outputs the playback non-permission information tothe playback unit 16. In this case, the content decrypting unit 61 mayerase the content key to prevent it from being stolen. Also, the erasureof the content key may be performed when the user performs an operationfor ending playing back a content.

1.4 Operation

In the following, the operation of each functional block constitutingthe electronic device 1 will be described. In the following description,it is presumed that the right type is “limit by time”.

1.4.1 Details of Operation of Control Procedure Determining Unit 52

The control procedure determining unit 52 determines a control procedureindicating an operation procedure of the decryption control unit 57.Also, the control procedure determining unit 52 operates differentlydepending on whether the time of the operation is immediately after astart of a playback of a content or the time of the operation is duringthe playback.

FIG. 7 is a flowchart showing details of the operation of the controlprocedure determining unit 52. Now, the operation will be described withreference to the drawing. The control procedure determining unit 52receives a content ID from the decryption request receiving unit 51(S101). Upon receiving the content ID, the control procedure determiningunit 52 obtains the playback state information from the playback statestorage unit 56 (S102).

The control procedure determining unit 52 judges whether or not theplayback state information has been set to the initial value (S103).

1.4.1.1 Operation when Playback State Information has been Set toInitial Value

Here, the operation of the control procedure determining unit 52immediately after a start of a playback of a content will be described.When it is judged that the playback state information has been set tothe initial value (YES in S103), the control procedure determining unit52 causes the key obtaining unit 53 to obtain the time change key 31,and causes the right management table access unit 54 to obtain the rightmanagement table 25 (S104).

The control procedure determining unit 52 decrypts the right managementtable 25 using the obtained time change key 31. Then, using the contentID received in step S101 as a key, the control procedure determiningunit 52 obtains, from the decrypted right management table 25, a righttype indicated by the right type 25 c for the content to be played back(S105). The control procedure determining unit 52 then determines acontrol procedure by reading out a control procedure of right judgmentand decryption that has been predetermined in correspondence with theobtained right type (S106). In this example in Embodiment 1, it ispresumed that the control procedure determining unit 52 reads out acontrol procedure corresponding to the right type “limit by time”.

After it determines a control procedure, the control proceduredetermining unit 52 outputs the decrypted right management table 25 tothe decryption control unit 57 (S107). The control procedure determiningunit 52 then outputs the determined control procedure, obtained playbackstate information, and received content ID to the decryption controlunit 57 (S108). The control procedure determining unit 52 thenincrements the value of the playback state information by one, andstores the incremented playback state information, the content ID, andthe control procedure into the playback state storage unit 56 (S109).

1.4.1.2 Operation when Playback State Information has not been Set toInitial Value

Here, the operation of the control procedure determining unit 52 duringthe playback of the content will be described. When it is judged thatthe playback state information has not been set to the initial value (NOin S103), the control procedure determining unit 52 reads out theplayback state information, content ID, and control procedure from theplayback state storage unit 56, and output them to the decryptioncontrol unit 57 (S110). The control procedure determining unit 52 thenincrements the value of the playback state information by one, andstores the incremented playback state information into the playbackstate storage unit 56 (S111).

1.4.2 Details of Operation of Decryption Control Unit 57

Next, the operation of the decryption control unit 57 will be describedin detail. The decryption control unit 57 controls the judgment of theright and decryption in accordance with the value of N, where N, as inN^(th) frame, indicates a frame number in the order of playback. Thedecryption control unit 57 also operates differently depending onwhether the time of the operation is immediately after a start of aplayback of a content or the time of the operation is during theplayback. The contents of the operation performed by the decryptioncontrol unit 57 are indicated by the control procedure determined by thecontrol procedure determining unit 52.

FIG. 8 is a flowchart showing details of the operation of the decryptioncontrol unit 57. Now, the operation will be described with reference tothe drawing. The decryption control unit 57 first receives the rightmanagement table 25 from the control procedure determining unit 52(S201). The decryption control unit 57 also receives the content ID,control procedure, and playback state information from the controlprocedure determining unit 52 (S202).

The decryption control unit 57 judges whether or not the receivedplayback state information has been set to the initial value (S203).

1.4.2.1 Operation when Playback State Information has been Set toInitial Value

Here, the operation of the decryption control unit 57 immediately aftera start of a playback of a content will be described. When it is judgedthat the playback state information has been set to the initial value(YES in S203), the decryption control unit 57 causes the timeinformation obtaining unit 55 to obtain the time information from thesecure clock 40 (S204). The decryption control unit 57 also extractsentry information corresponding to the received content ID, from theright management table 25 received in step S25, and outputs theextracted entry information, the time information obtained in step S204,and the playback state information received in step S202 to the rightjudging unit 58 (S205).

After the right judging unit 58 makes a judgment on the right, thedecryption control unit 57 receives the result of the judgment from theright judging unit 58 (S206). The decryption control unit 57 then judgeswhether the right is valid based on the received judgment result (S207).When it judges the right as valid (YES in S207), the decryption controlunit 57 outputs, to the content decrypting unit 61, the content keyindicated by the content key 25 b in the entry information, and theplayback permission information for controlling the operation of thecontent decrypting unit 61 (S208).

When it judges the right as invalid (NO in S207), the decryption controlunit 57 outputs the playback non-permission information for controllingthe operation of the content decrypting unit 61, to the contentdecrypting unit 61 (S209). The decryption control unit 57 also sets theplayback permission flag stored in the playback state storage unit 56 toa value that indicates that the playback is not permitted (S210), andreturns to step S202.

1.4.2.2 Operation when Playback State Information has not been Set toInitial Value

Here, the operation of the decryption control unit 57 during theplayback of the content will be described. When it is judged that theplayback state information has not been set to the initial value (NO inS203), the decryption control unit 57 determines, based on the valueindicated in the playback state information, a pattern of a process ofright judgment and decryption for the frame specified by the decryptionrequest received by the decryption request receiving unit 51 (refer toFIGS. 5A and 5B for the patterns), and performs a process according tothe determined pattern (S211). After completion of this step, thecontrol returns to step S202. Note that details of the patterns will bedescribed later.

Here, how the decryption control unit 57 determines the process patternwill be described, using an example shown in FIG. 5B. In the exampleshown in FIG. 5B, when the playback state information indicates “2”, itindicates that two frames have already been subjected to the decryptionprocess, and the next frame to be played back is the third frame. Inthis case, the decryption control unit 57 determines the pattern Q forthe process of right judgment and decryption, as shown in FIG. 5B.

1.4.2.3 Operation in Pattern Q

Here will be described the pattern Q process performed in step S211 bythe decryption control unit 57 referring to the value indicated by theplayback state information, namely, the process in which the decryptioncontrol unit 57 causes the right judging unit 58 to make a judgment onthe right, update the entry information stored in the right temporarystorage unit 59, and update the right management table 25 in the storagearea 20 to reflect the update of the entry information stored in theright temporary storage unit 59.

FIG. 9 is a flowchart of the pattern Q process performed in step S211 bythe decryption control unit 57.

The decryption control unit 57 causes the time information obtainingunit 55 to obtain the time information (S301). The decryption controlunit 57 outputs the obtained time information and the playback stateinformation received from the control procedure determining unit 52 tothe right judging unit 58 (S302). The decryption control unit 57 alsooutputs an update instruction to the right judging unit 58, where theupdate instruction instructs the right judging unit 58 to update thecontents of the right temporary storage unit 59 (S303). The decryptioncontrol unit 57 also outputs an entry information output instruction tothe right judging unit 58, where the entry information outputinstruction instructs the right judging unit 58 to output the contentsof the right temporary storage unit 59 to the decryption control unit 57(S304).

After the right judging unit 58 makes a judgment, the decryption controlunit 57 receives the result of the judgment from the right judging unit58 (S305). When it is judged that the right judging unit 58 has judgedthat the right is valid (YES in S306), the decryption control unit 57sets the playback permission flag in the playback state storage unit 56to a value indicating that the playback is permitted, and outputs theplayback permission information to the content decrypting unit 61(S307).

The decryption control unit 57 also receives the entry information fromthe right judging unit 58 when it is output therefrom according to theentry information output instruction. The decryption control unit 57causes the key obtaining unit 53 to obtain the time change key 31. Thedecryption control unit 57 causes the right management table access unit54 to obtain the right management table 25 (S308). The decryptioncontrol unit 57 decrypts the right management table 25 using the timechange key 31. The decryption control unit 57 then overwrites the entryinformation in the right management table 25 specified by the content ID(obtained in step S202 from the control procedure determining unit 52),with the entry information received from the right judging unit 58(S309).

The decryption control unit 57 encrypts the right management table 25after the overwriting of the entry information, using the time changekey 31, and causes the right management table access unit 54 to storethe encrypted right management table 25 into the storage area 20 (S310).

When it is judged that the right judging unit 58 has judged that theright is invalid (NO in S306), the decryption control unit 57 sets theplayback permission flag in the playback state storage unit 56 to avalue indicating that the playback is not permitted, and outputs theplayback non-permission information to the content decrypting unit 61(S311). After this, steps S308 through S310 are performed.

1.4.2.4 Operation in Other Patterns

Here will be described the processes of the other patterns.

Pattern P

In the pattern P, as shown in FIGS. 5A and 5B, the right judging unit 58confirms the right and updates the entry information stored in the righttemporary storage unit 59. In the pattern P, the process of updating theright management table 25 in the storage area 20 to reflect the updateof the entry information, as performed in the pattern Q, is notperformed. In the pattern P, the steps of the flowchart shown in FIG. 9,except for steps S304, S308, S309, and S310, are performed.

Pattern R

In the pattern R, as shown in FIGS. 5A and 5B, the right judging unit 58confirms the right. In the pattern R, the steps of the flowchart shownin FIG. 9, except for steps S303, S304, S308, S309, and S310, areperformed.

Pattern S

In the pattern S, as shown in FIGS. 5A and 5B, the confirmation of theright is not performed, but merely the decryption of the frames isperformed. In the pattern S, step S307 of the flowchart shown in FIG. 9is performed.

1.4.3 Details of Operation of Right Judging Unit 58

Next, the operation of the right judging unit 58 will be described indetail.

The right judging unit 58 makes a judgment on the right. The rightjudging unit 58 also updates or outputs the storage contents of theright temporary storage unit 59 in accordance with the updateinstruction or the entry information output instruction from thedecryption control unit 57. Also, the right judging unit 58 operatesdifferently depending on whether the time of the operation isimmediately after a start of a playback of a content or the time of theoperation is during the playback.

FIG. 10 is a flowchart showing details of the operation of the rightjudging unit 58. Now, the operation will be described with reference tothe drawing. The right judging unit 58 first receives the entryinformation from the decryption control unit 57 that was outputtherefrom in step S205 (S401). The right judging unit 58 also receivesthe time information and the playback state information that were outputfrom the decryption control unit 57 in step S205 or S302 (S402).

The right judging unit 58 judges whether or not the received playbackstate information has been set to the initial value (S403).

1.4.3.1 Operation when Playback State Information has been Set toInitial Value

Here, the operation of the right judging unit 58 immediately after astart of a playback of a content will be described. When it is judgedthat the playback state information has been set to the initial value(YES in S403), the right judging unit 58 refers to the playback totaltime 25 f and the playback right time 25 g in the entry informationobtained in step S401, and judges whether or not the time indicated bythe playback total time 25 f (hereinafter, referred to as “playbacktotal time”) is smaller than the time indicated by the playback righttime 25 g (hereinafter, referred to as “playback right time”), namely,judges whether the following condition is satisfied (S404).playback total time<playback right time

When it is judged that the playback total time is equal to or largerthan the playback right time (NO in S404), namely, when the right to usethe content has been consumed, the right judging unit 58 outputs ajudgment result indicating that the right is invalid, to the decryptioncontrol unit 57 (S408). The control then returns to step S401.

When it is judged that the playback total time is smaller than theplayback right time (YES in S404), namely, when the right to use thecontent has not been consumed, the right judging unit 58 stores the timeinformation obtained in step S402 into the start time storage unit 60(S405). The right judging unit 58 also stores the entry information intothe right temporary storage unit 59 (S406). After this, the rightjudging unit 58 judges whether or not the right is valid, using theentry information stored in the right temporary storage unit 59. Theright judging unit 58 outputs a judgment result indicating that theright is valid, to the decryption control unit 57 (S407). The controlthen returns to step S402.

1.4.3.2 Operation when Playback State Information has not been Set toInitial Value

Here, the operation of the right judging unit 58 during the playback ofthe content, namely the operation when it is judged that the playbackstate information has not been set to the initial value (NO in S403)will be described.

FIG. 11 is a flowchart showing the operation of the right judging unit58 during the playback of the content. Since the operation is to beperformed during the playback of the content, the start time storageunit 60 stores the time information corresponding to a previousjudgment. Note that the right judging unit 58 operates in accordancewith the update instruction and the entry information output instructionreceived from the decryption control unit 57.

The right judging unit 58 calculates an elapsed time by subtracting thetime indicated by the time information stored in the start time storageunit 60 from the time indicated by the time information obtained in stepS402 (S409). The elapsed time is a time period that has passed since aprevious update of the storage contents of the right temporary storageunit 59. After calculating the elapsed time, the right judging unit 58obtains the playback total time and the playback right time from theentry information stored in the right temporary storage unit 59,calculates a sum of the obtained playback total time and the calculatedelapsed time (S410), and judges whether the calculated sum is smallerthan the playback right time (S411). That is to say, the right judgingunit 58 judges whether the following condition is satisfied.playback total time+elapsed time<playback right time

When it is judged in step S411 that the calculated sum is smaller thanthe playback right time, it means that the right has not yet beenconsumed. In this case, therefore, the right judging unit 58 outputs, tothe decryption control unit 57, a judgment result indicating that theright is valid (S412). On the other hand, when it is judged in step S411that the calculated sum is equal to or larger than the playback righttime, it means that the right has already been consumed. In this case,therefore, the right judging unit 58 outputs, to the decryption controlunit 57, a judgment result indicating that the right is invalid (S413).

1.4.3.3 Operation Depending on Instruction from Decryption Control Unit57

After the above-described judgment, the right judging unit 58 operatesdepending on the update instruction and the entry information outputinstruction from the decryption control unit 57.

The right judging unit 58 judges whether the update instruction has beenoutput from the decryption control unit 57 (S414).

When the update instruction has been output (YES in S414), it isnecessary to update the storage contents of the right temporary storageunit 59. In this case, the right judging unit 58 overwrites the playbacktotal time 25 f in the entry information stored in the right temporarystorage unit 59, with the sum (playback total time+elapsed time)calculated in step S410 (S415). The right judging unit 58 then storesthe time information obtained in step S402 into the start time storageunit 60 (S416). When the update instruction has not been output (NO inS414), the above-described steps S415 and S416 are omitted.

The right judging unit 58 then judges whether the entry informationoutput instruction has been output from the decryption control unit 57(S417).

When the entry information output instruction has been output (YES inS417), the right judging unit 58 reads out the entry information fromthe right temporary storage unit 59, and outputs the read-out entryinformation to the decryption control unit 57 (S418). When the entryinformation output instruction has not been output (NO in S417), theabove-described step S418 is omitted.

After this, the right judging unit 58 returns to step S402.

1.4.4 Outline of Operations of Functional Blocks

FIG. 12 shows an outline of the operation of the right judgmentdecryption unit 15.

As shown in FIG. 12, the decryption request receiving unit 51 receivesthe content decryption request 23 from the decryption requesttransmitting unit 14 (S501).

The decryption request receiving unit 51 outputs the frames contained inthe content decryption request 23 to the content decrypting unit 61, andoutputs the content ID to the control procedure determining unit 52.

The control procedure determining unit 52, as shown in the drawing,performs the process of step S102 or the like having been explained withreference to in FIG. 7. Note that, when the playback state informationhas not been set to the initial value, the control procedure determiningunit 52 does not perform the process of steps S104 and S106. The controlprocedure determining unit 52 outputs, to the decryption control unit57, the content ID, the determined control procedure, the decryptedright management table 25, and the playback state information. Notethat, when the playback state information has not been set to theinitial value, the control procedure determining unit 52 does not outputthe decrypted right management table 25. The control proceduredetermining unit 52 then increments the value of the playback stateinformation by one, and stores the incremented playback stateinformation into the playback state storage unit 56 (S109 or S111 shownin FIG. 7).

The decryption control unit 57 performs a different pattern of processdepending on the value of the playback state information. The decryptioncontrol unit 57 obtains the time information (step S204 in FIG. 8 orstep S301 in FIG. 9), and outputs the entry information, playback stateinformation, and time information to the right judging unit 58. Also,the decryption control unit 57 outputs the update instruction and theentry information output instruction, depending on the process pattern.Note that, when the playback state information has not been set to theinitial value, the decryption control unit 57 does not output the entryinformation.

The right judging unit 58 judges whether the right is valid based on thereceived information (S505). The process of step S505 is the same asthat shown in FIG. 10. The right judging unit 58 then outputs thejudgment result to the decryption control unit 57. Also, the rightjudging unit 58 outputs the entry information stored in the righttemporary storage unit 59 to the decryption control unit 57 asnecessary.

The decryption control unit 57 outputs the playback permissioninformation or the playback non-permission information to the contentdecrypting unit 61, depending on the judgment result received from theright judging unit 58. The decryption control unit 57 overwrites theright management table 25 in the storage area 20 during the pattern Qprocess (S507). The process of step S507 is the same as the process ofsteps S308 through S310 shown in FIG. 9.

The content decrypting unit 61 decrypts the frame when it receives theplayback permission information (S509); and does not decrypt the frameswhen it receives the playback non-permission information.

1.4.5 Outline of Operation of Right Judgment Decryption Unit 15

Here will be described an outline of the operation of the right judgmentdecryption unit 15.

FIG. 13 shows an outline of the operation of the right judgmentdecryption unit 15.

Part (a) of FIG. 13 shows an outline of the operation of the rightjudgment decryption unit 15 immediately after a playback of a content isstarted, namely, when the playback state information has been set to theinitial value. The right judgment decryption unit 15 obtains the rightmanagement table 25 from the storage area 20, obtains the time changekey 31 from the time change key storage unit 30, and obtains the timeinformation from the secure clock 40. The right judgment decryption unit15 then causes the right judging unit 58 to make a judgment on the rightand stores the obtained time information into the start time storageunit 60 (S511). The right judgment decryption unit 15 then decrypts theframe in accordance with the judgment result (S509).

Part (b) of FIG. 13 shows an outline of the operation of the rightjudgment decryption unit 15 when the decryption control unit 57 performsthe pattern P process. The right judgment decryption unit 15 obtains thetime information from the secure clock 40, and causes the right judgingunit 58 to make a judgment on the right, update the entry informationstored in the right temporary storage unit 59, and update the timeinformation stored in the start time storage unit 60 (S513). The rightjudgment decryption unit 15 then decrypts the frame in accordance withthe judgment result (S509).

Part (c) of FIG. 13 shows an outline of the operation of the rightjudgment decryption unit 15 when the decryption control unit 57 performsthe pattern Q process. In this operation, in addition to the operationfor the pattern P, the right management table 25 in the storage area 20is updated to reflect the update of the entry information stored in theright temporary storage unit 59.

Part (d) of FIG. 13 shows an outline of the operation of the rightjudgment decryption unit 15 when the decryption control unit 57 performsthe pattern R process. In the pattern R process, the right judgmentdecryption unit 15 makes a judgment on the right, but does not updatethe entry information stored in the right temporary storage unit 59(S515).

Part (e) of FIG. 13 shows an outline of the operation of the rightjudgment decryption unit 15 when the decryption control unit 57 performsthe pattern S process. In the pattern S process, the right judgmentdecryption unit 15 does not make a judgment on the right, but decryptsthe frame.

1.4.6 Operation of Electronic Device 1

Here will be described the operation of the electronic device 1 havingthe above-described structure.

FIG. 14 is a flowchart showing the operation when the content managementunit 10 of the electronic device 1 plays back a content.

The electronic device 1 receives specification of a content to be playedback, from the user through the playback request receiving unit 11(S601).

The content judging unit 12 identifies the standard information and thecontent ID of the content specified by the user (602).

The content extracting unit 13 refers to the content management table22, identifies the storage location of the specified content in thestorage area 20, and obtains the content from the storage area 20(S603).

The decryption request transmitting unit 14 identifies the rightjudgment decryption unit 15 to be used for decrypting the content, fromamong one or more judgment decryption units 15, based on the standardinformation (S604). The decryption request transmitting unit 14 outputscontent decryption requests 23 each of which contains one frame, one byone to the right judgment decryption unit 15 (S605). Note that two ormore frames may be contained in the content decryption request 23.

The right judgment decryption unit 15 causes the right judging unit 58to judge whether or not the right for the content is valid, in units ofa predetermined number of frames (S606). When it judges that the rightis valid (YES in S606), the right judgment decryption unit 15 decryptsthe frame contained in the content decryption request 23 and outputs itto the playback unit 16 (S607). The playback unit 16 decodes thedecrypted frame, and plays back the content by outputting the decodeddata (S608). The control then returns to step S605.

When it judges that the right is invalid (NO in S606), the playback unit16 does not play back (S609), and the content management unit 10 endsthe operation.

Note that detailed explanation on the operation of the right judgmentdecryption unit 15 has already been given, it is omitted here.

Also, although not shown in the flowchart, when the user performs anoperation for ending the playback of the content, the electronic device1 causes the playback unit 16 to stop playing back the content bycausing the OS to generate a process interrupt (same as S609). When itperforms this, the decryption control unit 57 sets the playbackpermission flag stored in the playback state storage unit 56 to a valuethat indicates that the playback is not permitted. Also, when itreceives from the user an operation for ending the playback of thecontent, the decryption control unit 57 may perform the pattern Qprocess so that the right management table 25 is updated to reflect theupdate of the entry information stored in the right temporary storageunit 59, and the updated right management table 25 is written to thestorage area 20. Further, when it performs this, it may delete the entryinformation from the right temporary storage unit 59. Also, when itperforms this, it may delete the content key stored in the contentdecrypting unit 61, as explained in “1.3.11 Content Decrypting Unit 61”.

2. Embodiment 2

The following will describe Embodiment 2.

In Embodiment 1, the case where the right type is “limit by time” wasexplained. However, it is possible to make a judgment on the right orupdate the right in units of frames as described in Embodiment 1, evenwhen the right type is other than “limit by time”, for example, when theright type is “limit by period” or “limit by number”.

The following description will center on the differences from Embodiment1.

2.1 When Right Type is “Limit by Period”

First, the operation of an electronic device 1 b when the right type is“limit by period” will be explained. The electronic device 1 b differsfrom the electronic device 1 of Embodiment 1 in the operation of theright judgment decryption unit 15. Especially, the operation of theright judging unit 58 differs. More specifically, when the right type is“limit by period”, what matters is whether the time exceeds the deadlineindicated by the playback deadline 25 h in the right management table25, and the right management table 25 is not updated.

The following will describe the differences from Embodiment 1.

2.1.1 Control Procedure Determining Unit 52

The control procedure determining unit 52 reads out a control procedurewhich corresponds to the right type “limit by period”, in step S106shown in FIG. 7.

Note that, in S110, the control procedure determining unit 52 may notoutput the content ID to the decryption control unit 57 during aplayback of a content. The following will explain the reason. InEmbodiment 1, to update the right management table 25 to reflect theupdate of the entry information stored in the right temporary storageunit 59, it is necessary to specify entry information in the rightmanagement table 25 which should be overwritten with new entryinformation. For the specification, the content ID is required (see theprocess in step S309 shown in FIG. 9). However, since the rightmanagement table 25 is not updated in the case of the right type “limitby period”, there is no need for the decryption control unit 57 to holdthe content ID during a playback of a content (note that, evenEmbodiment 1, the decryption control unit 57 receives entry informationstored in the right temporary storage unit 59 from the right judgingunit 58, and thus it is possible to specify entry information in theright management table 25 which should be overwritten with new entryinformation, by referring to the content ID 25 a indicated in thereceived entry information).

2.1.2 Decryption Control Unit 57

The decryption control unit 57 operates in almost the same manner as inEmbodiment 1, which has been explained with reference to FIG. 8. Thedifference is that, in step S211 shown in FIG. 8, the decryption controlunit 57 performs the pattern R process (confirmation of right) or thepattern S process (no confirmation of right), and does not perform thepattern P process or the pattern Q process. Note that the decryptioncontrol unit 57 may perform only the pattern R process. The operationsin the pattern R and S processes have already been described inEmbodiment 1, and thus the description thereof is omitted here.

2.1.3 Right Judging Unit 58

The right judging unit 58 operates in almost the same manner as inEmbodiment 1, which has been explained with reference to FIG. 10.

FIG. 15 is a flowchart showing the operation of the right judging unit58 when the right type is “limit by period”.

The process is performed as shown in FIG. 15. The same processes asthose shown in FIG. 10 are assigned with the same reference signs, anddescription thereof is omitted. The process shown in FIG. 15 differsfrom the process shown in FIG. 10 in that the right judging unit 58performs step S421 in place of step S404. Also, the right judging unit58 does not perform step S405 shown in FIG. 10 when the right type is“limit by period”. This is because there is no need to hold the timeinformation. In step S421, the right judging unit 58 judges whether ornot the time indicated by the time information obtained from thedecryption control unit 57 has exceeded the playback deadline indicatedby the playback deadline 25 h in the entry information obtained from thedecryption control unit 57. Note that, since the playback deadline isgenerally managed by the date as shown in FIG. 4, the decryption controlunit 57 may obtain only the date as the time information.

Next will be described the operation in the case where it is judged instep S403 that the playback state information has not been set to theinitial value (NO in step S403), namely, the operation during a playbackof a content.

FIG. 16 is a flowchart showing the operation of the right judging unit58 during a playback of a content when the right type is “limit byperiod”.

The corresponding process in Embodiment 1 has been explained withreference to FIG. 11. The process shown in FIG. 16 differs from theprocess shown in FIG. 11 in that it has step S423 in place of step S411.Also, another difference is that steps S409, S410, and S414 through S418shown in FIG. 11 are not performed in the process shown in FIG. 16.

The right judging unit 58 judges whether or not the time indicated bythe time information obtained from the decryption control unit 57 hasexceeded the playback deadline indicated by the playback deadline 25 hin the entry information stored in the right temporary storage unit 59(S423).

When there is time (for example, several days or more) before thedeadline indicated by the playback deadline 25 h in the right managementtable 25, there is less need to perform the confirmation of right eachtime decryption of frame is performed. Accordingly, the confirmation ofright may be performed only when there is a small amount of time beforethe playback deadline (for example, only when a content is played backon the day being the playback deadline).

For example, when it is judged that the time indicated by the timeinformation has not exceeded the playback deadline in step S421 shown inFIG. 15, it may further be judged whether or not the time indicated bythe time information matches the date indicated by the playbackdeadline. When it is judged that the time indicated by the timeinformation matches the date indicated by the playback deadline, thesucceeding step S406 and step S423 shown in FIG. 16 and the like areperformed one by one; and when it is judged that the time indicated bythe time information does not match the date indicated by the playbackdeadline, output are a positive judgment result and predeterminedinformation for notifying to the decryption control unit 57 that thereis no need to perform judgment of right in correspondence withdecryption of frame.

Also, when the decryption control unit 57 receives the judgment resultand the above-described predetermined information in step S206, thedecryption control unit 57 may increase the percentage of the pattern Sprocess (no confirmation of right).

In the above-described example, the entry information is stored in theright temporary storage unit 59, and then confirmation of right isperformed. However, there may be a case where the frequency ofconfirmation of right is not high. Accordingly, the entry informationmay not be stored into the right temporary storage unit 59, and theright management table 25 may be read out from the storage area 20 eachtime confirmation of right is performed, and the right judging unit 58may perform the judgment. In this case, the right temporary storage unit59 is not necessary.

2.2 When Right Type is “Limit by Number”

Next, the operation of an electronic device 1 c when the right type is“limit by number” will be explained. Compared with the case where theright type is “limit by period”, especially the operation of thedecryption control unit 57 and the right judging unit 58 differs. It ispresumed here that the control procedure determining unit 52 determinesa control procedure corresponding to the right type “limit by number”,and outputs it to the decryption control unit 57.

In the present embodiment, confirmation of right (namely, whether or notthe number of playbacks of the content has exceeded the number ofplaybacks permitted by right) is performed for a content when a playbackof the content is started, and the right management table 25 in thestorage area 20 is updated after a predetermined time has passed sincethe start of the playback of the content. This arrangement is made toprevent the right from being consumed immediately after a start of theplayback because there may be a case where a content starts to be playedback without an intention of the user, for example, when the user startsto playback a content by misoperation. Accordingly, this arrangement ismade such that the right is consumed after the content is played back toa certain extent.

In the following operation example, when a content starts to be playedback, the right judging unit 58 performs confirmation of right, andstores the entry information with incremented number of playbacks intothe right temporary storage unit 59. And during a playback of a content,the right judging unit 58 judges whether a predetermined time haselapsed since the start of the playback of the content. When it judgesthat the predetermined time has elapsed, the right judging unit 58outputs the entry information stored in the right temporary storage unit59 to the decryption control unit 57, and the decryption control unit 57writes the received entry information into the right management table 25in the storage area 20.

2.2.1 Decryption Control Unit 57

The operation of the decryption control unit 57 when the right type is“limit by number” will be explained. The operation when the playbackstate information has been set to the initial value is the same as thatexplained in Embodiment 1 with reference to FIG. 8, and thus descriptionthereof is omitted here. The operation when the playback stateinformation has not been set to the initial value is different from thatexplained in Embodiment 1. That is to say, details of step S211 shown inFIG. 8 are different from those provided in Embodiment 1.

FIG. 17 is a flowchart showing the operation of the decryption controlunit 57 when a content of the right type “limit by number” is playedback and the playback state information has not been set to the initialvalue. Note that the same processes as those shown in FIG. 9 areassigned with the same reference signs, and description thereof isomitted. The process shown in FIG. 17 differs from the process shown inFIG. 9 in that it does not have steps S303, S304, S307, and S311 shownin FIG. 9 and that step S331 is performed in place of step S306 shown inFIG. 9. Another difference is that step S333 is performed in the processshown in FIG. 17.

In step S331, the decryption control unit 57 receives, from the rightjudging unit 58, a result of the judgment on whether a predeterminedtime has elapsed since the start of the playback of the content, andwhen the received judgment result indicates that the predetermined timehas elapsed, the decryption control unit 57 updates the right managementtable 25 in the storage area 20 by performing steps S308, S309, andS310. After the update, the decryption control unit 57 sets thesucceeding operation pattern to “no confirmation of right”, namely thepattern S in Embodiment 1. This is because there is no need to performconfirmation of right in the succeeding steps since the right managementtable 25 in the storage area 20 has already been updated.

2.2.2 Right Judging Unit 58

Next, the operation of the right judging unit 58 will be described.

FIG. 18 is a flowchart showing the operation of the right judging unit58 when the right type is “limit by number”. FIG. 18 mainly shows theoperation when the playback state information has been set to theinitial value. The operation when the playback state information has notbeen set to the initial value will be described in detail later withreference to FIG. 19. Note that the same processes as those shown inFIG. 10 are assigned with the same reference signs, and descriptionthereof is omitted.

The process shown in FIG. 18 differs from the process shown in FIG. 10in that step S431 is performed in place of step S404 shown in FIG. 10,and that step S433 is performed in place of step S406 shown in FIG. 10.

In step S431, the right judging unit 58 judges whether or not the valueindicated in the playback number 25 d in the entry information receivedfrom the decryption control unit 57 is smaller than the value indicatedin the right number 25 e (the number of playbacks<the number ofplaybacks permitted by right). When it judges that the value is smaller,the right judging unit 58 performs step S405, increments, by one, thevalue indicated in the playback number 25 d in the entry information,and stores it into the right temporary storage unit 59 (S433).

Next will be described the operation when the playback state informationhas not been set to the initial value.

FIG. 19 is a flowchart showing the operation of the right judging unit58 when the right type is “limit by number” and when the playback stateinformation has not been set to the initial value. Note that the sameprocesses as those shown in FIG. 11 are assigned with the same referencesigns, and description thereof is omitted.

The process shown in FIG. 19 differs from the process shown in FIG. 11in that step S410 and the like shown in FIG. 11 are not performed, andthat steps S435, S437, and S439 are performed.

As shown in FIG. 19, the right judging unit 58 calculates an elapsedtime in step S409. More specifically, the right judging unit 58calculates the elapsed time by subtracting the time indicated by thetime information stored in the start time storage unit from the timeindicated by the time information received in step S402 from thedecryption control unit 57.

In step S435, the right judging unit 58 judges whether or not theelapsed time has exceeded the predetermined time. Note that informationindicating the predetermined time may be held by the right judging unit58 preliminarily or may be notified from the decryption control unit 57in step S401 or S402.

When it judges that the elapsed time has exceeded the predetermined time(YES in step S435), the right judging unit 58 outputs, to the decryptioncontrol unit 57, a judgment result indicating that the elapsed time hasexceeded the predetermined time (S437), and then performs step S418 andoutputs the entry information stored in the right temporary storage unit59 to the decryption control unit 57.

When it judges that the elapsed time has not exceeded the predeterminedtime (NO in step S435), the right judging unit 58 outputs, to thedecryption control unit 57, a judgment result indicating that theelapsed time has not exceeded the predetermined time (S439).

2.2.3 Other Update Methods

In the above-described example, a comparison between two times is madeto judge whether or not the predetermined time has elapsed. Not limitedto this, the right management table 25 in the storage area 20 may beupdated when the number of frames having been played back reaches apredetermined number.

For example, as described above, when the playback state information hasbeen set to the initial value, the right judging unit 58 may store theentry information with incremented number of playbacks into the righttemporary storage unit 59 (S433). Then the decryption control unit 57may perform decryption of frame without confirmation of right until thevalue of the playback state information reaches a predetermined value(namely, the pattern S process shown in FIG. 5); and when the value hasreached the predetermined value, the decryption control unit 57 maycause the right judging unit 58 to output the entry information storedin the right temporary storage unit 59 to overwrite the entryinformation in the right management table 25 in the storage area 20 withthe output entry information. In this case, the time information is notused. Accordingly, there is no need for the decryption control unit 57to cause the time information obtaining unit 55 to obtain the timeinformation. That is to say, there is no need for the decryption controlunit 57 to perform step S204 shown in FIG. 8. FIGS. 20 through 23 showexamples of operations of the decryption control unit 57 and the rightjudging unit 58 in such a case.

FIG. 20 is a flowchart showing the operation of the decryption controlunit 57.

The process shown in FIG. 20 differs from the process shown in FIG. 8 inthat step S204 (obtaining the time information) is not performed, andthat step S205 b is performed in place of step S205 shown in FIG. 8.Also, step S205 b differs from step S205 in that the time information isnot output.

FIG. 21 is a flowchart showing the operation of the decryption controlunit 57 updating the right management table 25 in the storage area 20when the value of the playback state information has reached thepredetermined value in the middle of a playback of a content. Theprocess shown in FIG. 21 differs from the process shown in FIG. 17 inthat steps S301, S305, S331, and S333 are not performed, that step S302b is performed in place of step S302 shown in FIG. 17, and that stepS304 is performed. Also, step S205 b differs from step S205 in that thetime information is not output. Also, step S302 b differs from step S302in that the time information is not output.

After the right management table 25 in the storage area 20 is updated asdescribed above, the decryption control unit 57 performs decryption offrame without performing confirmation of right.

FIG. 22 is a flowchart showing the operation of the right judging unit58.

The process shown in FIG. 22 differs from the process shown in FIG. 18in that step S405 (storing the time information) is not performed, andthat step S402 b is performed in place of step S402 shown in FIG. 18.Step S402 b differs from step S402 in that the time information is notreceived.

FIG. 23 is a flowchart showing the operation performed when the playbackstate information is received from the decryption control unit 57 in themiddle of a playback of a content.

The process shown in FIG. 23 differs from the process shown in FIG. 19in that steps S409, S435, S437, and S439 are not performed, and thatstep S417 is performed.

Note that each step has already been explained, and description thereofis omitted here.

2.3 Supplemental Notes

When it is found as a result of judgment in Embodiment 1 or 2 that thereis no right to use a content, the has cannot be played back, the usernotification unit 17 may notify that a content cannot be played back.For example, when the playback period permitted by right has expired, amessage such as “Playback period has expired” may be displayed on thedisplay unit.

3. Modifications

Each of the above-described embodiments may be modified as follows.

3.1 Modification 1

In the above-described embodiments, the right management table 25 isencrypted with use of the time change key 31. Not limited to this, thefollowing modification is possible. As shown in FIG. 24, each piece ofentry information stored in the right management table 25 may beencrypted with use of a different encryption key, and encryption keysmay be stored as a list (an encryption key list 28) in correspondencewith content IDs. And a key used for encrypting the encryption key list28 (a list encryption key 33) may be generated based on the count valueof the secure counter. Note that the encryption of the encryption keylist 28 is performed in, for example, the CBC (Cipher Block Chain) mode.It is preferable that the count value of the secure counter is updatedat a predetermined timing, for example, when the playback requestreceiving unit 11 receives a content playback request, or when the rightmanagement table 25 in the storage area 20 is updated. The encryptionkey list 28 is decrypted and encrypted before and after the update. Theencryption key list 28 is encrypted with use of the list encryption key33 generated based on the count value of the secure counter. Note thatthe count value of the secure counter as it is or one or morepredetermined bits extracted therefrom may be used as the listencryption key 33.

It is preferable that the encryption key list 28 or the list encryptionkey 33 is stored in an area, such as an internal area of atamper-resistant module, that is protected from unauthorized accesses.Alternatively, the encryption key list 28 or the list encryption key 33may be stored in the time change key storage unit 30. Each piece ofentry information in the right management table 25 has been encryptedwith use of a different encryption key. With this structure, even if theright management table 25 has been analyzed in an unauthorized manner,it is difficult to decrypt all pieces of entry information therein.Accordingly, the right management table 25 may be stored in a memorythat is outside a tamper-resistant module and can be accessed at a highspeed.

Also, in this case, the list encryption key 33 and the encryption keylist 28 need to be held in an environment protected from unauthorizedaccesses. This is because if the encryption key list 28 is analyzed inan unauthorized manner and decrypted, the encryption keys for all piecesof entry information are obtained by the unauthorized accessor.

In this case, the decryption control unit 57 causes the key obtainingunit 53 to obtain the encryption key list 28 and the list encryption key33, instead of the time change key 31. The decryption control unit 57then decrypts a piece of entry information in the right management table25 corresponding to the content ID, using the obtained encryption keylist 28 and the list encryption key 33, and outputs the result to theright judging unit 58. When the right management table 25 in the storagearea 20 is updated, the encryption key list 28 and the list encryptionkey 33 are obtained in a similar manner so that the right managementtable 25 can decrypted and encrypted.

Note that the list encryption key 33 may be the same as the time changekey 31.

3.2 Modification 2

In each of the above-described embodiments, part or all of theelectronic device 1 may be subjected to a tamper detection process at apredetermined timing.

For example, the electronic device 1 may perform the tamper detectiononto the playback unit 16 or the like when the first frame of a contentis decrypted. Especially, the electronic device 1 may perform the tamperdetection onto a content playback application. This is because it willreduce the possibility that a content is played back in an unauthorizedmanner by an unauthorized application. The electronic device 1 mayfurther cause the user notification unit 17 to urge the user to update aplayback application when it has detected a tamper in the playbackapplication.

Also, the electronic device 1 may perform the tamper detection when theapplication is updated or installed. The electronic device 1 may furtherstop executing the application immediately after it has detected atamper therein during the execution of the application.

3.2.1 Tamper Detection Target

The target of the tamper detection may be the data required to beprotected, such as the above-described playback application, data likethe right management table 25 that is stored in the storage area 20, orthe entry information stored in the right temporary storage unit 59.

3.2.2 Timing of Tamper Detection

The timing of the tamper detection may be when the data to be protectedis accessed.

The timing may be, for example, when the right management table accessunit 54 obtains the right management table 25 in the storage area 20(S104, S308 or the like), or when the right management table 25 isupdated to reflect the update of the entry information stored in theright temporary storage unit 59 (S309, S310, S418 or the like). Otherthan these, the tamper detection may be performed onto the rightmanagement table 25 in the storage area 20 or onto other data even ifthe right management table 25 is not updated (for example, when thedecryption control unit 57 performs the pattern P process).

Further, the timing of the tamper detection may be when the rightjudging unit 58 stores the entry information into the right temporarystorage unit 59 (S406), when the right judging unit 58 updates the entryinformation stored in the right temporary storage unit 59 (S415), orwhen confirmation of right is performed based on the entry informationstored in the right temporary storage unit 59 (S411). Still further, thetiming of the tamper detection may be when the entry information storedin the right temporary storage unit 59 is not updated (NO in S414), orwhen the right judging unit 58 does not perform confirmation of right(for example, when the decryption control unit 57 performs the pattern Sprocess).

Still further, the timing of the tamper detection may be when the timeinformation obtaining unit 55 obtains the time information from thesecure clock 40 (S204, S301 or the like), or when the time informationis stored into the start time storage unit 60 (S405, S416 or the like).

Still further, the timing of the tamper detection may be when the securecounter of the above-described Modification 1 or the secure clock 40updates the value, or when the value of the secure counter is obtained.

Still further, the timing of the tamper detection may be when a contentplayback application is activated and the first frame of a content isdecrypted, namely, when the playback state information has been set tothe initial value.

Still further, the tamper detection may be performed each time theplayback state information is set to a predetermined value, namely, eachtime a predetermined number of frames are decrypted. For example, thetamper detection may be performed each time 25 frames are decrypted.

Note that it is often difficult to perform the tamper detection onto alldetection targets including, for example, a content playback applicationat once. Accordingly, the tamper detection may be performed such thateach tamper detection is performed onto a different part of the tamperdetection target in turn. For example, the tamper detection may beperformed such that each tamper detection is performed onto a differentpart of a content playback application in turn. For example, as shown inFIG. 25, the tamper detection may be performed each time 25 frames aredecrypted such that the tamper detection is changed in sequence.

3.2.3 Tamper Detection Operation

It is preferable that the above-described tamper detection is performedby a tamper-resistant module. For example, the tamper detection may beperformed by the right judgment decryption unit 15 implemented with atamper-resistant technology. In the case where the tamper detection isperformed by the right judgment decryption unit 15, the process by thetimer interrupt or the like becomes unnecessary when decryption isperformed in units of frames in accordance with the value of theplayback state information stored in the playback state storage unit 56and the tamper detection is performed at regular intervals in units offrames. This makes the implementation easy.

As for the tamper detection method, the following method may be used,for example. First, preliminarily held is a hash value of the data to beprotected, such as a content playback application or the rightmanagement table 25, and then, during the tamper detection, a hash valueof the detection target is calculated and it is judged whether or notthe held hash value matches the calculated hash value of the detectiontarget. In this case, it must be taken care, before a content is playedback, that the hash value preliminarily held for the comparison is notan unauthorized value. For this purpose, for example, when theapplication or the right management table 25 is distributed from anauthenticate right owner, it is confirmed through an electronicsignature that the application or the like has not been tampered, but isan authentic one. Then, before a content is played back, a hash value ofthe application or the like whose authenticity has been confirmed ispreliminarily held. Also, even in the middle of a playback of a content,it may be confirmed through an electronic signature that the applicationor the like is an authentic one.

3.3 Modification 3

In Embodiment 1, the percentages of the processes of the differentpatterns performed by the decryption control unit 57 may be changeddynamically in accordance with the operation state of the electronicdevice 1.

FIG. 26 is a functional block diagram of a right judgment decryptionunit 15 b in Modification 3. The structure of the right judgmentdecryption unit 15 b shown in FIG. 26 differs from the structure of theright judgment decryption unit 15 shown in FIG. 2 in that it includes anenvironment detection unit 62.

3.3.1 Environment Detection Unit 62

The environment detection unit 62 controls the percentages of theprocesses of the different patterns performed by the decryption controlunit 57 in accordance with the operation state of the electronic device1. The operation state of the electronic device 1 is, for example, a CPUuse rate of the CPU of the electronic device 1. The operation state ofthe electronic device 1 is managed by the OS (Operation System) of theelectronic device 1. The environment detection unit 62 obtains theoperation state of the electronic device 1 by accessing the OS.

More specifically, the environment detection unit 62 stores a table,such as the one shown in FIG. 6A. FIG. 6A shows a table 26 a indicatingthe CPU use rates of the electronic device 1 in correspondence with thepercentages of the patterns (patterns P, Q, R and S, see FIG. 5A)performed by the decryption control unit 57. For example, theenvironment detection unit 62 detects the CPU use rate, and storesinformation indicating the percentage of each pattern in correspondencewith each range of CPU use rate. The decryption control unit 57 accessesthe environment detection unit 62 to refer to the information held bythereby, and determines the percentages of the patterns fornot-played-back frames of the content, based on the information. Forexample, when the environment detection unit 62 detects that the CPU userate is 10%, the environment detection unit 62 holds informationindicating the percentages of the patterns as: “the pattern P is 20%,the pattern Q is 80%, the pattern R is 0%, and the pattern S is 0%”. Thedecryption control unit 57 accesses the information held by theenvironment detection unit 62 and determines how the processes with thepatterns are performed onto the not-played-back frames of the contentfor each of the frames in the order so that the pattern P is 20% and thepattern Q is 80%. With regards to the frequency with which thedecryption control unit 57 accesses the environment detection unit 62,the decryption control unit 57 may access the environment detection unit62 each time the decryption control unit 57 decrypts a predeterminednumber of frames, for example.

Here, the process load of each pattern is taken into account when thepercentage of each pattern corresponding to the operation state of theelectronic device 1 is determined. The pattern Q has the highest processload among the patterns since it performs writing of right into thestorage area 20. Therefore, the percentage of the pattern Q may beincreased while the electronic device 1 has sufficient processingcapability, and the percentages of the other patterns may be increasedwhen the electronic device 1 does not have sufficient processingcapability.

Also, a writing condition table 26 b writing condition table 26 b asshown in FIG. 6B may be held by the environment detection unit 62 suchthat the environment detection unit 62 selects a writing condition inaccordance with the detected CPU use rate. Here, the writing conditionindicates the condition on which the right management table 25 in thestorage area 20 is updated to reflect the update of the entryinformation stored in the right temporary storage unit 59. For example,when the CPU use rate is in a range of 0%-20%, the writing condition is“writing per 1 frame”, indicating that the right management table 25 inthe storage area 20 is updated by overwriting each time one frame isplayed back. The environment detection unit 62 outputs the selectedwriting condition to the decryption control unit 57. Upon receiving thewriting condition from the environment detection unit 62, the decryptioncontrol unit 57 overwrites the right management table 25 in the storagearea 20 in accordance with the received writing condition. Morespecifically, the decryption control unit 57 stores a value of theplayback state information that is obtained when the overwriting of theright management table 25 is performed, and then it performs overwritingof the right management table 25 using the value having already beenstored and a value indicated by the playback state information obtainedwhen a frame is decrypted newly. With this structure, the decryptioncontrol unit 57 can overwrite the right management table 25 each timethe right judgment decryption unit 15 decrypts a predetermined number offrames.

Note that, in this case, as shown in FIG. 6B, when the CPU use rate is82% or more, there is a possibility that overwriting of the rightmanagement table 25 in the storage area 20 is not performed before theplayback of the content ends. Accordingly, the decryption control unit57 may overwrite the right management table 25 each time a predeterminednumber of frames, for example 50 frames, are decrypted.

As a supplementary note to the overwriting of the right management table25, not limited to the CPU use rate, the overwriting may be forciblyperformed when the playback time of a content has exceeded apredetermined time. For example, the decryption control unit 57 mayobtain a content playback start time from the secure clock 40, andstores it as the start time information. After this, the decryptioncontrol unit 57 may obtain the time information each time a frame isdecrypted, and may forcibly perform the overwriting of the rightmanagement table 25 in the storage area 20 when a difference between thetimes indicated by the start time information and the obtained timeinformation exceeds the predetermined time.

Other than the CPU use rate and the content playback time, for example,when the electronic device 1 is operating by the multitasking, thedecryption control unit 57 may determine the timing of the overwritingof the right management table 25 in accordance with the number of timesthe application is executed. The number of times the application isexecuted may be obtained by the environment detection unit 62 from theOS and may be notified to the decryption control unit 57. The higher thenumber of times the application is executed is, the smaller thefrequency with which the decryption control unit 57 performs theoverwriting of the right management table 25 is.

Also, the decryption control unit 57 may adjust the frequency ofoverwriting the right management table 25 in accordance with the type(music, moving picture or the like) of the content to be played back.For example, when the content management unit 10 is to play back amoving picture content, whose data amount is larger than that of musicdata, the decryption control unit 57 may decrease the frequency ofoverwriting the right management table 25 since it increases the load ofthe playback process, compared with the case of playing back the musicdata.

Also, the decryption control unit 57 may determine the timing at whichto overwrite the right management table 25 depending on whether theelectronic device 1 is in the idle state or the electronic device 1 isoperating in the power saving mode. The decryption control unit 57 mayincrease the frequency of overwriting the right management table 25 whenthe electronic device 1 is in the idle state, and may decrease thefrequency of overwriting the right management table 25 when theelectronic device 1 is operating in the power saving mode. In summary,the decryption control unit 57 may overwrite the right management table25 with a high frequency when the electronic device 1 has sufficientprocessing capability and fully exerts the capability, and thedecryption control unit 57 may decrease the frequency when theelectronic device 1 does not have sufficient processing capability.

3.3.2 Supplementary Notes to Modification 3

(1) In the above-described Modification 3, after the environmentdetection unit 62 determines the percentage of each pattern, the orderof assigning the patterns for each of the not-played-back frames may bedetermined by (a) the decryption control unit 57 or (b) the environmentdetection unit 62. That is to say, in the case of (a), the environmentdetection unit 62 dynamically changes the percentage of each patternperformed by the decryption control unit 57, in accordance with theoperation state of the electronic device 1, and stores informationindicating the percentage of each pattern. Namely, the environmentdetection unit 62 determines only the percentage of each pattern, butdoes not determine which pattern should be assigned to each frame. Thedecryption control unit 57 sequentially obtains, from the environmentdetection unit 62, information that indicates the percentage of eachpattern, and determines which pattern should be assigned to each frame,in accordance with the percentage indicated by the obtained information.Also, in the case of (b), the environment detection unit 62 sequentiallydetermines the percentage of each pattern in accordance with theoperation state of the electronic device 1, and further determines thepattern to be assigned to each of the not-played-back frames so that thedetermined percentage is achieved.

(2) In the “1.4.6 Operation of Electronic Device 1” section ofEmbodiment 1, the timing when the user performs an operation for endingthe playback of a content is described as an example of the timing atwhich the right management table 25 in the storage area 20 is updated toreflect the update of the entry information stored in the righttemporary storage unit 59.

In Embodiment 3, when the environment detection unit 62 or the likedetects that the power of the electronic device 1 has decreased, theelectronic device 1 may cause the decryption control unit 57 to performa process of updating the right management table 25 in the storage area20 to reflect the update of the entry information stored in the righttemporary storage unit 59, by causing the OS to generate a processinterrupt. In this case, to prevent the overwriting of the rightmanagement table 25 from failing due to the lack of power supply, theelectronic device 1 may be equipped with an extra battery or the like.

3.4 Other Modification Examples

Up to now, the present invention has been described through severalembodiments thereof. However, the present invention is not limited tothe embodiments, but includes, for example, the following modifications.

(1) Each device described above is specifically a computer system thatincludes a microprocessor, ROM, RAM, a hard disk unit, a display unit, akeyboard, a mouse and the like. A computer program is stored in the RAMor the hard disk unit. The microprocessor operates in accordance withthe computer program and each device achieves its functions. Thecomputer program is composed of a plurality of instruction codes thatinstruct the computer to achieve predetermined functions.

(2) Part or all of the structural elements constituting the devicesdescribed above may be achieved in one system LSI (Large ScaleIntegration). The system LSI is an ultra multi-functional LSI that ismanufactured by integrating a plurality of components on one chip. Morespecifically, the system LSI is a computer system that includes amicroprocessor, ROM, RAM and the like. A computer program is stored inthe RAM. The microprocessor operates in accordance with the computerprogram, thereby enabling the system LSI to achieve its functions.

Each part of structural elements constituting each of theabove-described devices may be achieved on one chip, or part or allthereof may be achieved on one chip.

Although the term LSI is used here, it may be called IC, LSI, super LSI,ultra LSI or the like, depending on the level of integration. It is alsopossible to use the FPGA (Field Programmable Gate Array), with which aprogramming is available after the LSI is manufactured, or thereconfigurable processor that can re-configure the connection or settingof the circuit cells within the LSI.

Furthermore, a technology for an integrated circuit that replaces theLSI may appear in the near future as the semiconductor technologyimproves or branches into other technologies. In that case, the newtechnology may be incorporated into the integration of the functionalblocks constituting the present invention as described above. Suchpossible technologies include biotechnology.

(3) Part or all of the structural elements constituting each of theabove-described devices may be achieved as an IC card or a single modulethat is attachable/detachable to or from each device. The IC card ormodule is a computer system that includes a microprocessor, ROM, RAM,and the like. The IC card or module may include the aforesaid ultramulti-functional LSI. The microprocessor operates in accordance with thecomputer program and causes the IC card or module to achieve thefunctions. The IC card or module may be tamper resistant.

(4) The present invention may be methods shown by the above. The presentinvention may be a computer program that allows a computer to realizethe methods, or may be a digital signal representing the computerprogram.

Furthermore, the present invention may be a computer-readable recordingmedium such as a flexible disk, a hard disk, CD-ROM, MO, DVD, DVD-ROM,DVD RAM, BD (Blu-ray Disc), or a semiconductor memory, that stores thecomputer program or the digital signal. Furthermore, the presentinvention may be the digital signal recorded on any of theaforementioned recording mediums.

Furthermore, the present invention may be the computer program or thedigital signal transmitted via an electric communication line, awireless or wired communication line, a network of which the Internet isrepresentative, or a data broadcast.

Furthermore, the present invention may be a computer system thatincludes a microprocessor and a memory, the memory storing the computerprogram, and the microprocessor operating according to the computerprogram.

Furthermore, by transferring the program or the digital signal via therecording medium, or by transferring the program or the digital signalvia the network or the like, the program or the digital signal may beexecuted by another independent computer system.

(5) The present invention may be any combination of the above-describedembodiments and modifications.

(6) The present invention may be methods shown by the above. The presentinvention may be a program that allows a CPU to realize the methods, ormay be a digital signal representing the computer program.

(7) Furthermore, the present invention may be a computer-readablerecording medium such as a flexible disk, a hard disk, CD-ROM, MO, DVD,DVD-ROM, DVD RAM, BD (Blu-ray Disc), or a semiconductor memory, thatstores the computer program or the digital signal. Furthermore, thepresent invention may be the digital signal recorded on any of theaforementioned recording mediums.

(8) The present invention may be any combination of the above-describedembodiments and modifications.

The technology of the present invention is useful as, for example, amethod for updating the right of the content for which the playback timeis limited, when applied to an electronic device which is implementedwith a technology of protecting the copyright of the contents,especially in the case where a playback of a content should beimmediately ended when the right has been consumed.

1. An electronic device comprising: a storage unit storing rightinformation used for managing whether or not a content can be playedback, the right information being stored in a state protected fromunauthorized accesses; a receiving unit including a microprocessoroperable to receive, one by one, a plurality of frames that constitutethe content in an encrypted state; a right judging unit including amicroprocessor operable to judge whether or not the content is permittedto be played back, in accordance with the right information; a controlunit including a microprocessor operable to (a) cause the right judgingunit to perform the judgment each time an Nth frame, of the plurality offrames, is received by the receiving unit and a value N satisfies apredetermined judgment condition, the value N being a natural numberindicating a position of a frame in an order of a playback of theplurality of frames constituting the content, (b) decrypt the Nth frameand cause the decrypted Nth frame to be played back, when the rightjudging unit judges that the content is permitted to be played back, and(c) restrict the playback of frames, of the plurality of frames, locatedafter the Nth frame, when the right judging unit judges that the contentis not permitted to be played back; and a tamper detection unitincluding a microprocessor operable to perform a tamper detection for apart of an application module that plays back the content, and each timea tamper is detected, sequentially change the part of the applicationmodule for which the tamper detection is to be performed, wherein thetamper detection unit performs the tamper detection for a first part ofthe application module when a value indicating a position of a currentlyreceived frame, of the plurality of frames received by the receivingunit, satisfies the predetermined judgment condition a first time, andperforms the tamper detection for a second part, which is different fromthe first part, of the application module when the value indicating theposition of the currently received frame, of the plurality of framesreceived by the receiving unit, satisfies the predetermined judgmentcondition a second time.
 2. The electronic device of claim 1, whereinthe content includes at least a first frame and a second frame, which isdifferent from the first frame, wherein the application module isconstituted from a plurality of blocks which include at least a firstblock and a second block, which is different from the first block, andwherein the tamper detection unit performs the tamper detection for thefirst block when the first frame is decrypted, and performs the tamperdetection for the second block when the second frame is decrypted. 3.The electronic device of claim 1, wherein the right information includesplayback total time information and playback right time information, theplayback total time information indicating a playback total time, whichis a total time of playback of the content having been performed, theplayback right time information indicating a playback right time, whichis a time period for which the content is permitted to be played back,wherein the right judging unit performs the judgment by comparing theplayback right time with a sum of the playback total time and an elapsedtime, the elapsed time being a time that has elapsed while the contenthas been played back, and wherein the control unit includes a rightupdating sub-unit including a microprocessor operable to update theplayback total time information stored in the storage unit according tothe sum of the elapsed time and the playback total time indicated by theplayback total time information, in a process of decrypting the Nthframe when the value N satisfies a predetermined update condition. 4.The electronic device of claim 3, wherein the electronic device furthercomprises a right temporary storage unit having a storage area which isaccessible at a higher speed than the storage unit, wherein the controlunit reads the right information from the storage unit and stores theread right information in the right temporary storage unit, wherein theright judging unit performs the judgment in accordance with the rightinformation stored in the right temporary storage unit, wherein theright updating sub-unit performs: a first process to update the playbacktotal time information stored in the right temporary storage unitaccording to the sum of the elapsed time and the playback total timeindicated by the right information; and a second process to update theright information stored in the storage unit according to the rightinformation that has been updated and stored in the right temporarystorage unit, and wherein the control unit causes the right updatingsub-unit to perform either the first process or both the first processand the second process, depending on the value N, in a process ofdecrypting the Nth frame.
 5. The electronic device of claim 1, whereinthe tamper detection unit, while performing the tamper detection for apart of the electronic device, selects, as a target of tamper detection,a part of the electronic device that has not been subjected to tamperdetection, each time the tamper detection unit detects a tamper.
 6. Theelectronic device of claim 1, wherein the electronic device furthercomprises a user notification unit operable to notify a user, andwherein, when the tamper detection unit detects a tamper, the usernotification unit notifies the user that the application module needs tobe updated.
 7. The electronic device of claim 1, wherein, when thetamper detection unit detects a tamper, the control unit stops theapplication module from playing back the content.
 8. The electronicdevice of claim 1, wherein the tamper detection unit performs the tamperdetection when the right information stored in the storage unit isaccessed, in a process of decrypting a frame of the plurality of frames.9. The electronic device of claim 1, wherein the tamper detection unitperforms the tamper detection in a process of decrypting an initialframe, of the plurality of frames, in the playback of the content. 10.The electronic device of claim 1, wherein the tamper detection unitperforms the tamper detection each time a predetermined number offrames, of the plurality of frames, are decrypted, in the playback ofthe content.
 11. The electronic device of claim 1, wherein the tamperdetection unit performs the tamper detection when the right judging unitperforms the judgment.
 12. The electronic device of claim 1, wherein thetamper detection unit performs the tamper detection when a playbackapplication is installed or updated, the playback application being anapplication that performs a content playback process.
 13. The electronicdevice of claim 1, wherein the control unit restricts the playback ofthe content when the tamper detection unit detects a tamper.
 14. Acontent playback control method for use in an electronic device forcontrolling playback of a content, the electronic device including astorage unit storing right information used for managing whether or nota content can be played back, the right information being stored in astate protected from unauthorized accesses, the content playback controlmethod comprising: receiving, one by one, a plurality of frames thatconstitute the content in an encrypted state; judging whether or not thecontent is permitted to be played back, in accordance with the rightinformation; causing said judging to perform the judgment each time anNth frame, of the plurality of frames, is received by said receiving anda value N satisfies a predetermined judgment condition, the value Nbeing a natural number indicating a position of a frame in an order of aplayback of the plurality of frames constituting the content; decryptingthe Nth frame and causing the decrypted Nth frame to be played back,when said judging judges that the content is permitted to be playedback; restricting the playback of frames, of the plurality of frames,located after the Nth frame, when said judging judges that the contentis not permitted to be played back; and performing a tamper detectionfor a part of an application module that plays back the content, andeach time a tamper is detected, sequentially changing the part of theapplication module for which the tamper detection is to be performed,wherein said performing of the tamper detection performs the tamperdetection for a first part of the application module when a valueindicating a position of a currently received frame, of the plurality offrames received by said receiving, satisfies the predetermined judgmentcondition a first time, and performs the tamper detection for a secondpart, which is different from the first part, of the application modulewhen the value indicating the position of the currently received frame,of the plurality of frames received by said receiving, satisfies thepredetermined judgment condition a second time.
 15. A non-transitorycomputer-readable recording medium having a control program storedthereon, the control program for causing an electronic device to playback a content, the electronic device including a storage unit storingright information used for managing whether or not a content can beplayed back, the right information being stored in a state protectedfrom unauthorized accesses, the control program causing a computer ofthe electronic device to execute a method comprising: receiving, one byone, a plurality of frames that constitute the content in an encryptedstate; judging whether or not the content is permitted to be playedback, in accordance with the right information; causing said judging toperform the judgment each time an Nth frame, of the plurality of frames,is received by said receiving and a value N satisfies a predeterminedjudgment condition, the value N being a natural number indicating aposition of a frame in an order of a playback of the plurality of framesconstituting the content; decrypting the Nth frame and causing thedecrypted Nth frame to be played back, when said judging judges that thecontent is permitted to be played back; restricting the playback offrames, of the plurality of frames, located after the Nth frame, whensaid judging judges that the content is not permitted to be played back;and performing a tamper detection for a part of an application modulethat plays back the content, and each time a tamper is detected,sequentially changing the part of the application module for which thetamper detection is to be performed, wherein said performing of thetamper detection performs the tamper detection for a first part of theapplication module when a value indicating a position of a currentlyreceived frame, of the plurality of frames received by said receiving,satisfies the predetermined judgment condition a first time, andperforms the tamper detection for a second part, which is different fromthe first part, of the application module when the value indicating theposition of the currently received frame, of the plurality of framesreceived by said receiving, satisfies the predetermined judgmentcondition a second time.
 16. An integrated circuit for use in anelectronic device for playing back a content, the electronic deviceincluding a storage unit storing right information used for managingwhether or not a content can be played back, the right information beingstored in a state protected from unauthorized accesses, the integratedcircuit comprising: a receiving unit including a microprocessor operableto receive, one by one, a plurality of frames that constitute thecontent in an encrypted state; a right judging unit including amicroprocessor operable to judge whether or not the content is permittedto be played back, in accordance with the right information; a controlunit including a microprocessor operable to (a) cause the right judgingunit to perform the judgment each time an Nth frame, of the plurality offrames, is received by the receiving unit and a value N satisfies apredetermined judgment condition, the value N being a natural numberindicating a position of a frame in an order of a playback of theplurality of frames constituting the content, (b) decrypt the Nth frameand cause the decrypted Nth frame to be played back, when the rightjudging unit judges that the content is permitted to be played back, and(c) restrict the playback of frames, of the plurality of frames, locatedafter the Nth frame, when the right judging unit judges that the contentis not permitted to be played back; and a tamper detection unit operableto perform a tamper detection for a part of an application module thatplays back the content, and each time a tamper is detected, sequentiallychange the part of the application module for which the tamper detectionis to be performed, wherein the tamper detection unit performs thetamper detection for a first part of the application module when a valueindicating a position of a currently received frame, of the plurality offrames received by the receiving unit, satisfies the predeterminedjudgment condition a first time, and performs the tamper detection for asecond part, which is different from the first part, of the applicationmodule when the value indicating the position of the currently receivedframe, of the plurality of frames received by the receiving unit,satisfies the predetermined judgment condition a second time.